Difference between revisions of "BPI-Bit-S2"

From Banana Pi Wiki
Jump to: navigation, search
(Hardware upgrade and function comparison)
 
(43 intermediate revisions by 2 users not shown)
Line 6: Line 6:
 
[[File:Webduino_gif.gif|thumb|[[BPI-Bit]] with ESP32]]
 
[[File:Webduino_gif.gif|thumb|[[BPI-Bit]] with ESP32]]
 
[[File:Leaf-S3-incline-front.jpg|thumb|[[BPI-Leaf-S3]] with ESP32-S3]]
 
[[File:Leaf-S3-incline-front.jpg|thumb|[[BPI-Leaf-S3]] with ESP32-S3]]
 +
[[File:BPI-Centi-S3_2.jpg|thumb|[[BPI-Centi-S3]] with ESP32-S3 front]]
 
[[File:BPI-AI_1.JPG|thumb|[[BPI-AI]] Kendryte K210 RISC-V]]
 
[[File:BPI-AI_1.JPG|thumb|[[BPI-AI]] Kendryte K210 RISC-V]]
 
[[File:ESP32_6.JPG|thumb|[[BPI-UNO32]] with ESP32 design]]
 
[[File:ESP32_6.JPG|thumb|[[BPI-UNO32]] with ESP32 design]]
Line 11: Line 12:
 
[[File:BPI-Bit-S2_banner.jpg|800px]]
 
[[File:BPI-Bit-S2_banner.jpg|800px]]
  
'''BPI-Bit-S2''' development board is a successor to BPI:Bit, inheriting most of the core hardware functions.
+
'''BPI-Bit-S2''' development board is a successor to [[BPI-Bit]], inheriting most of the hardware functions.
  
Support Webduino, Arduino, MicroPython programming environment suitable for STEAM education.
+
IO is compatible with micro:bit and can use most peripheral accessories of micro:bit.
  
== key features ==
+
Support Webduino, Arduino, MicroPython & CircuitPython programming environment suitable for STEAM education.
 +
 
 +
== Key features ==
  
 
* ESP32-S2
 
* ESP32-S2
Line 22: Line 25:
 
* 1 thermistor sensor
 
* 1 thermistor sensor
 
* 2 photosensitive sensors
 
* 2 photosensitive sensors
* 2 buttons on the front, 1 reset button and 1 boot button on the back
+
* 2 programmable keys,1 BOOT key,1 Reset key
 
* Type-C USB interface
 
* Type-C USB interface
 
* Size 5x5cm
 
* Size 5x5cm
 
* The Goldfinger Edge Connector definition is fully compatible with Micro: Bit
 
* The Goldfinger Edge Connector definition is fully compatible with Micro: Bit
  
== Hardware upgrade and function comparison ==
+
== Feature comparison ==
  
{| class="wikitable"  
+
{| class="wikitable" style="width: 50%;"
 
|-
 
|-
! colspan="3" style="text-align:center; background-color:#FFCB2F;" | BPI:Bit VS BPI-Bit-S2  
+
! colspan="3" style="text-align:center; background-color:#FFCB2F;" | micro:bit vs BPI-Bit-S2
 
|-
 
|-
| Module
+
| Product
| BPI:Bit
+
| micro:bit V2.2X
 
| BPI-Bit-S2
 
| BPI-Bit-S2
 
|-
 
|-
| SoC control chip
+
| MCU
| ESP32
+
| Nordic nRF52833
| ESP32-S2
+
| Espressif ESP32-S2
 
|-
 
|-
| ROM
+
| Frequency
| 448 KB
+
| 64MHz
| 128 KB
+
| 240MHz
 
|-
 
|-
 
| RAM
 
| RAM
| 520 KB
+
| 128KB
 
| 320 KB
 
| 320 KB
 
|-
 
|-
 
| FlASH ROM
 
| FlASH ROM
| 4096 KB
+
| 512KB
 
| 4096 KB
 
| 4096 KB
 
|-
 
|-
Line 57: Line 60:
 
| 2048 KB
 
| 2048 KB
 
|-
 
|-
| Wireless Capability
+
| Wireless Communication
| WIFI,Bluetooth
+
| Bluetooth,microbit-radio
| WIFI
+
| WIFI, IEEE 802.11 b/g/n, 2.4Ghz
 
|-
 
|-
 
| LED
 
| LED
| 25 WS2812-5050 RGB LED
+
| 25 red LEDs
| 25 WS2812-3535 RGB LED
+
| 25 WS2812-3535 RGB LEDs
 
|-
 
|-
 
| Key
 
| Key
| 2 programmable keys,1 RST key
+
| 2 programmable keys, 1 RST key
| 2 programmable keys,1 BOOT key,1 RST key
+
| 2 programmable keys, 1 BOOT key, 1 RST key
 
|-
 
|-
 
| Buzzer
 
| Buzzer
| 5.3x5.3mm buzzer
+
| Yes
| 8.5x8.5mm buzzer
+
| Yes
 +
|-
 +
| Microphone
 +
| Yes
 +
| None
 
|-
 
|-
| USB interface
+
| USB Socket
 
| Micro USB
 
| Micro USB
 
| Type-C USB
 
| Type-C USB
 
|-
 
|-
| USB to TTL
+
| USB interface chip
| support
+
| nRF52833-QDAA or nRF52820-QDAA
| None
+
| MCU chip built-in
 
|-
 
|-
 
| Battery socket
 
| Battery socket
| support
+
| Yes
 
| None
 
| None
 
|-
 
|-
 
| IO
 
| IO
| 19 pin Goldfinger IO
+
| 19 pins golden finger IO, alligator clip bayonet, support touch sensing
| 19 pin  Goldfinger IO
+
| 19 pins golden finger IO (compatible with micro:bit), alligator clip bayonet, support touch sensing
 
|-
 
|-
| Nine-axis sensor
+
| Motion sensor
| support
+
| Yes
 
| None
 
| None
 
|-
 
|-
 
| Photosensitive sensor
 
| Photosensitive sensor
| 2
+
| None
 
| 2
 
| 2
 
|-
 
|-
 
| Thermistor sensor
 
| Thermistor sensor
| 1
+
| 1 on-core
| 1
+
| 1 on-board
 
|}
 
|}
  
Line 110: Line 117:
 
! colspan="2" style="text-align:center; background-color:#FFCB2F;" | BPI-Bit-S2 specification
 
! colspan="2" style="text-align:center; background-color:#FFCB2F;" | BPI-Bit-S2 specification
 
|-
 
|-
| SoC
+
| MCU
 
| ESP32-S2FN4R2,Xtensa® 32 bit LX7 Single-Core Processer
 
| ESP32-S2FN4R2,Xtensa® 32 bit LX7 Single-Core Processer
 
|- style="vertical-align:middle;"
 
|- style="vertical-align:middle;"
| frequency
+
| Frequency
 
| 240MHz MAX
 
| 240MHz MAX
 
|- style="vertical-align:middle;"
 
|- style="vertical-align:middle;"
Line 140: Line 147:
 
| ADC,TOUCH,PWM,SPI,I2C,I2S,Pulse counter, RMT,TWAI® Controller,SD/MMC,LCD_CAMERA
 
| ADC,TOUCH,PWM,SPI,I2C,I2S,Pulse counter, RMT,TWAI® Controller,SD/MMC,LCD_CAMERA
 
|- style="vertical-align:middle;"
 
|- style="vertical-align:middle;"
| external crystal
+
| External crystal
 
| 40Mhz
 
| 40Mhz
 
|-
 
|-
Line 147: Line 154:
 
|- style="vertical-align:middle;"
 
|- style="vertical-align:middle;"
 
| LED  
 
| LED  
| 25 Series full color LED lamp, single line GPIO control; 1 monochrome LED, CONTROLLED by GPIO
+
| 25 WS2812 rgb LED, single line GPIO control; 1 monochrome LED, controlled by GPIO0
 
|- style="vertical-align:middle;"
 
|- style="vertical-align:middle;"
| photosensitive sensor
+
| Photosensitive sensor
 
| 2 photosensitive sensor
 
| 2 photosensitive sensor
 
|- style="vertical-align:middle;"
 
|- style="vertical-align:middle;"
| thermistor sensor
+
| Thermistor sensor
 
| 1 thermistor sensor
 
| 1 thermistor sensor
 
|- style="vertical-align:middle;"
 
|- style="vertical-align:middle;"
Line 159: Line 166:
 
|- style="vertical-align:middle;"
 
|- style="vertical-align:middle;"
 
| Key  
 
| Key  
| 2 Programmable buttons,1 BOOT botton,1 reset botton
+
| 2 programmable keys,1 BOOT key,1 Reset key
 
|- style="vertical-align:middle;"
 
|- style="vertical-align:middle;"
 
| USB
 
| USB
 
| USB Type-C interface,full speed USB OTG,USB-ACM
 
| USB Type-C interface,full speed USB OTG,USB-ACM
 
|- style="vertical-align:middle;"
 
|- style="vertical-align:middle;"
| operating voltage
+
| Operating voltage
 
| 3.3V
 
| 3.3V
 
|- style="vertical-align:middle;"
 
|- style="vertical-align:middle;"
Line 170: Line 177:
 
| USB Type-C input 5V,or Goldfinger IO input 3.3V power supply
 
| USB Type-C input 5V,or Goldfinger IO input 3.3V power supply
 
|- style="vertical-align:middle;"
 
|- style="vertical-align:middle;"
| size
+
| Size
 
| 5 * 5 cm
 
| 5 * 5 cm
 
|}
 
|}
Line 180: Line 187:
 
! colspan="3" style="background-color:#ffcb2f;" | Peripheral GPIO allocation and signal type
 
! colspan="3" style="background-color:#ffcb2f;" | Peripheral GPIO allocation and signal type
 
|-
 
|-
| photosensitive sensor(L)
+
| Photosensitive sensor(L)
 
| GPIO 12  
 
| GPIO 12  
 
| Analog Input
 
| Analog Input
 
|-
 
|-
| photosensitive sensor(R)
+
| Photosensitive sensor(R)
 
| GPIO 13
 
| GPIO 13
 +
| Analog Input
 +
|-
 +
| Thermistor sensor
 +
| GPIO 14
 
| Analog Input
 
| Analog Input
 
|-
 
|-
Line 200: Line 211:
 
| Digital Input
 
| Digital Input
 
|-
 
|-
| thermistor sensor
+
| Buzzer
| GPIO 14
 
| Analog Input
 
|-
 
| buzzer
 
 
| GPIO 17
 
| GPIO 17
 
| PWM(Digital Output)
 
| PWM(Digital Output)
 
|-
 
|-
| RGB_LED
+
| RGB LEDs
 
| GPIO 18
 
| GPIO 18
 
| Digital Output
 
| Digital Output
 
|}
 
|}
  
== 5*5 Full color LED lights ==
+
== 5*5 RGB LED ==
BPI-Bit-S2 have 25 Full color LED lights , single GPIO ontrol.The three primary color pixels of each LED can achieve 8bit 256 level brightness display, and achieve 16777216 color full color display, scanning frequency is not less than 400Hz/s.
+
BPI-Bit-S2 have 25 WS2812 full color RGB LED, single GPIO ontrol.
 +
 
 +
The three primary color pixels of each LED can achieve 8bit 256 level brightness display,  
 +
 
 +
and achieve 16777216 color full color display,  
 +
 
 +
scanning frequency is not less than 400Hz/s.
 
{| class="wikitable"  
 
{| class="wikitable"  
 
|-
 
|-
! colspan="5" style="background-color:#ffcb2f;" | 5*5 LEDs list of BPI-Bit-S2
+
! colspan="5" style="background-color:#ffcb2f;" | 5*5 LED Sequential List
 
|-
 
|-
 
| 20
 
| 20
Line 303: Line 316:
 
[[File:Webduino_logo_1200x350.jpg|800px ]]
 
[[File:Webduino_logo_1200x350.jpg|800px ]]
  
[https://webbit.webduino.io/blockly/?demo=default webduino在线积木编程平台]
+
[https://webbit.webduino.io/blockly/?demo=default webduino online building block programming platform]
 +
 
 +
[https://ota.webduino.io/WebBitInstaller/WebBitSetup.exe webduino building block programming platform, Windows Installer]
 +
 
 +
[https://webbit.webduino.io/tutorials/doc/zh-cn/education/index.html webduino online tutorials]
 +
 
 +
== MicroPython ==
 +
 
 +
[[File:Mircopython.png | 800px]]
 +
 
 +
MicroPython is a lean and efficient implementation of the Python 3 programming language that includes a small subset of the Python standard library and is optimised to run on microcontrollers and in constrained environments.
  
[https://ota.webduino.io/WebBitInstaller/WebBitSetup.exe webduino积木编程平台 Windows安装版]
+
Crowdfunded and open sourced in 2013 by Damien P. George.
  
[https://webbit.webduino.io/tutorials/doc/zh-cn/education/index.html webduino在线教学手册]
+
The most obvious difference between it and the use of C programs to develop microcontrollers is that there is no need for lengthy compilation when verifying code.
 +
 
 +
Using serial communication software, enter commands through the REPL(read-eval-print-loop) to control the microcontroller, just like Python's REPL.
 +
 
 +
It is also possible to use some tools to upload a python script file to run inside the microcontroller.
 +
 
 +
Its implementation of Python3 includes the _thread library that supports multithreading and the asyncio library for writing concurrent code.
 +
 
 +
MicroPython aims to be as compatible with normal Python as possible to allow you to transfer code with ease from the desktop to a microcontroller or embedded system.
 +
 
 +
At the same time it also has some libraries specific for microcontrollers in order to take full advantage of the hardware features inside the microcontroller chip, such as timers, hardware interrupts, WiFi, etc., depending on the specific hardware.
 +
 
 +
While having the above features, it is compact enough to fit and run within just 256k of code space and 16k of RAM.
 +
 
 +
If you know Python you already know MicroPython.
 +
 
 +
On the other hand, the more you learn about MicroPython the better you become at Python.
 +
 
 +
== CircuitPython ==
 +
 
 +
[[File:CircuitPython_Repo_header_logo.jpg | 800px]]
 +
 
 +
CircuitPython is an open source, educational derivative of MicroPython, support and developed by Adafruit Industries.
 +
 
 +
Comparing ease of use, it goes a step further on the basis of MicroPython.
 +
 
 +
When the development board running CircuitPython firmware is connected to the PC, the PC will immediately recognize it as a USB storage disk.
 +
 
 +
And the python script file can be copied to this disk to allow the program to run on the development board.
 +
 
 +
Modern operating systems and home PCs support USB storage disks, this allows users to use it out of the box.
 +
 
 +
Of course, in order to use REPL,  a serial communication software needs to be installed, or a text editor that supports this function, such as Mu editor.
 +
 
 +
The CircuitPython community provides an extremely rich peripheral driver library, APIs documentation, and tutorials.
 +
 
 +
Even if there is no programming foundation, no hardware foundation, you can quickly get started from scratch.
 +
 
 +
CircuitPython does not support some microcontroller-specific libraries such as timer and hardware interrupt, nor does it support the multi-threaded _thread library. It only provides the asyncio library for writing concurrent code.
 +
 
 +
The code is very compatible between microcontrollers supported by CircuitPython and single-board computers (SBCs) supported by Blinka. This is thanks to its efforts to unify APIs.
 +
 
 +
[https://circuitpython.org/board/bpi_bit_s2/ BPI-Bit-S2 CircuitPython Download Page]
 +
 
 +
[https://codewith.mu/ Mu Editor]
 +
 
 +
'''How to install tinyUF2 firmware:'''
 +
 
 +
To enable your BPI-Bit-S2 device to flash via USB-CDC.
 +
 
 +
Connect it to the computer via USB, hold BOOT button, press RST button once, then release BOOT button.
 +
 
 +
In the Install, Repair, or Update UF2 Bootloader section at the bottom of the page, follow its instructions to download and install tinyUF2 firmware.
 +
 
 +
'''How to install CircuitPython firmware:'''
 +
 
 +
Click the DOWNLOAD .UF2 NOW button on the right side of the page to download the firmware to the local, and then copy it to the disk in BPI-Bit-S2 UF2 Bootloader mode, and it can be used after automatic reset.
  
 
== Arduino ==
 
== Arduino ==
Line 313: Line 392:
 
[[File:Arduino_logo_1200x350.png | 800px]]
 
[[File:Arduino_logo_1200x350.png | 800px]]
  
Arduino 是一个开源嵌入式软硬件开发平台,用来供用户制作可交互式的嵌入式项目。
+
Arduino is an open source embedded hardware and software development platform for users to create interactive embedded projects.
  
* [https://www.arduino.cc/en/software Arduino IDE 下载地址] | [https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing 安装并配置Arduino-ESP32运行环境]
+
The Arduino integrated development environment (IDE) is the software core of this platform, using the C/C++ programming language to develop projects.
* [https://docs.espressif.com/projects/arduino-esp32/en/latest/libraries.html#apis Arduino-ESP32 APIs]
 
  
Preparing...
+
The biggest feature of Arduino is to provide a unified API to develop all microcontrollers it supports, with very good code portability and reusability.
  
== MicroPython ==
+
In addition, it simplifies the process of building a development environment, and all the development environments of microcontrollers it supports can be installed and configured with a single click.
  
[[File:Mircopython.png | 800px]]
+
It also provides simple one-click mechanisms to compile and upload programs to a microcontroller.
  
MicroPython实现了大部分Python 3 特性和语法,易学易上手,验证程序效果无需编译直接下载进芯片运行。
+
Arduino IDE alsoprovides many example codes, supplemented by a large number of comments, which can help users get started quickly.
  
无论是否有编程基础,MicroPython的上手难度绝对远低于其他编程语言,其代码易读性高,且开源社区有多年积累的丰富资源,就如同Python一样拥有极强的生命力与应用价值。
+
A large number of excellent open source projects accumulated in the Arduino community are available for reference and learning, and there are quite a few driver libraries and APIs provided by chip manufacturers as well.
  
Preparing...
+
* [https://www.arduino.cc/en/software Arduino IDE download link] | [https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing Install and configure Arduino-ESP32 running environment]
 +
* [https://docs.espressif.com/projects/arduino-esp32/en/latest/libraries.html#apis Arduino-ESP32 APIs]
  
 
= Documents =
 
= Documents =
  
[https://github.com/BPI-STEAM/BPI-BIT-Lite-Doc/blob/main/sch/BPI-BIT-Lite-V0.2.pdf BPI-Bit Lite schematic]
+
[https://github.com/BPI-STEAM/BPI-BIT-Lite-Doc/blob/main/sch/BPI-BIT-Lite-V0.2.pdf BPI-Bit-S2 schematic]
 +
 
 +
=Easy to buy sample=
 +
*Aliexpress shop : https://www.aliexpress.us/item/3256804809903732.html
 +
*Taobao ship: https://item.taobao.com/item.htm?spm=a213gs.success.result.1.d1187a86CepiGC&id=693462857865
 +
*OEM & ODM : [email protected]

Latest revision as of 02:49, 6 March 2023


About BPI-Bit-S2

BPI-Bit-S2 with ESP32-S2
BPI-Bit with ESP32
BPI-Leaf-S3 with ESP32-S3
BPI-Centi-S3 with ESP32-S3 front
BPI-AI Kendryte K210 RISC-V
BPI-UNO32 with ESP32 design

BPI-Bit-S2 banner.jpg

BPI-Bit-S2 development board is a successor to BPI-Bit, inheriting most of the hardware functions.

IO is compatible with micro:bit and can use most peripheral accessories of micro:bit.

Support Webduino, Arduino, MicroPython & CircuitPython programming environment suitable for STEAM education.

Key features

  • ESP32-S2
  • 5x5 RGB LED matrix
  • 1 buzzer
  • 1 thermistor sensor
  • 2 photosensitive sensors
  • 2 programmable keys,1 BOOT key,1 Reset key
  • Type-C USB interface
  • Size 5x5cm
  • The Goldfinger Edge Connector definition is fully compatible with Micro: Bit

Feature comparison

micro:bit vs BPI-Bit-S2
Product micro:bit V2.2X BPI-Bit-S2
MCU Nordic nRF52833 Espressif ESP32-S2
Frequency 64MHz 240MHz
RAM 128KB 320 KB
FlASH ROM 512KB 4096 KB
PSRAM None 2048 KB
Wireless Communication Bluetooth,microbit-radio WIFI, IEEE 802.11 b/g/n, 2.4Ghz
LED 25 red LEDs 25 WS2812-3535 RGB LEDs
Key 2 programmable keys, 1 RST key 2 programmable keys, 1 BOOT key, 1 RST key
Buzzer Yes Yes
Microphone Yes None
USB Socket Micro USB Type-C USB
USB interface chip nRF52833-QDAA or nRF52820-QDAA MCU chip built-in
Battery socket Yes None
IO 19 pins golden finger IO, alligator clip bayonet, support touch sensing 19 pins golden finger IO (compatible with micro:bit), alligator clip bayonet, support touch sensing
Motion sensor Yes None
Photosensitive sensor None 2
Thermistor sensor 1 on-core 1 on-board

Hardware interface

Bpi bit v2 interface en.jpg

BPI-Bit-S2 specification
MCU ESP32-S2FN4R2,Xtensa® 32 bit LX7 Single-Core Processer
Frequency 240MHz MAX
operating temperature -40℃~+85℃
ROM 128 KB
SRAM 320 KB
FLASH ROM 4 MB
PSRAM 2 MB
WIFI IEEE 802.11 b/g/n ,2.4Ghz
GPIO 19 available GPIO pins have been introduced
Peripheral functions ADC,TOUCH,PWM,SPI,I2C,I2S,Pulse counter, RMT,TWAI® Controller,SD/MMC,LCD_CAMERA
External crystal 40Mhz
Buzzer 8.5x8.5mm buzzer
LED 25 WS2812 rgb LED, single line GPIO control; 1 monochrome LED, controlled by GPIO0
Photosensitive sensor 2 photosensitive sensor
Thermistor sensor 1 thermistor sensor
IO 19 pins Goldfinger IO,19 pins contacts on the back
Key 2 programmable keys,1 BOOT key,1 Reset key
USB USB Type-C interface,full speed USB OTG,USB-ACM
Operating voltage 3.3V
Power USB Type-C input 5V,or Goldfinger IO input 3.3V power supply
Size 5 * 5 cm

On-board peripherals

Peripheral GPIO allocation and signal type
Photosensitive sensor(L) GPIO 12 Analog Input
Photosensitive sensor(R) GPIO 13 Analog Input
Thermistor sensor GPIO 14 Analog Input
Key A GPIO 38 Digital Input
Key B GPIO 33 Digital Input
Key BOOT GPIO 0 Digital Input
Buzzer GPIO 17 PWM(Digital Output)
RGB LEDs GPIO 18 Digital Output

5*5 RGB LED

BPI-Bit-S2 have 25 WS2812 full color RGB LED, single GPIO ontrol.

The three primary color pixels of each LED can achieve 8bit 256 level brightness display,

and achieve 16777216 color full color display,

scanning frequency is not less than 400Hz/s.

5*5 LED Sequential List
20 15 10 5 0
21 16 11 6 1
22 17 12 7 2
23 18 13 8 3
24 19 14 9 4

Goldfinger GPIO define

BPI-Bit-S2 Gold finger GPIO is defined to be compatible with Micro:Bit. GPIO expansion board accessories can be used with Micro: Bit.

Bpi bit v2 goldfinger.jpg

SPI,I2C
Function Pin Name GPIO Num
SPI_SCK P13 GPIO36
SPI_MISO P14 GPIO37
SPI_MOSI P15 GPIO35
SPI_CS P16 GPIO34
I2C_SCL P19 GPIO16
I2C_SDA P20 GPIO15

Power

BPI-Bit-S2 supports two power supply modes

1. Type-C USB:Use USB cable power supply, connect USB interface of computer or other 5V USB charger to power the development board.

2. Gold finger: At the bottom of the development board, the gold finger contains a power interface with both input and output functions. It uses 3.3V power supply, positive terminal is connected to 3V3, and negative terminal is connected to GND.

Software

Webduino

Webduino logo 1200x350.jpg

webduino online building block programming platform

webduino building block programming platform, Windows Installer

webduino online tutorials

MicroPython

Mircopython.png

MicroPython is a lean and efficient implementation of the Python 3 programming language that includes a small subset of the Python standard library and is optimised to run on microcontrollers and in constrained environments.

Crowdfunded and open sourced in 2013 by Damien P. George.

The most obvious difference between it and the use of C programs to develop microcontrollers is that there is no need for lengthy compilation when verifying code.

Using serial communication software, enter commands through the REPL(read-eval-print-loop) to control the microcontroller, just like Python's REPL.

It is also possible to use some tools to upload a python script file to run inside the microcontroller.

Its implementation of Python3 includes the _thread library that supports multithreading and the asyncio library for writing concurrent code.

MicroPython aims to be as compatible with normal Python as possible to allow you to transfer code with ease from the desktop to a microcontroller or embedded system.

At the same time it also has some libraries specific for microcontrollers in order to take full advantage of the hardware features inside the microcontroller chip, such as timers, hardware interrupts, WiFi, etc., depending on the specific hardware.

While having the above features, it is compact enough to fit and run within just 256k of code space and 16k of RAM.

If you know Python you already know MicroPython.

On the other hand, the more you learn about MicroPython the better you become at Python.

CircuitPython

CircuitPython Repo header logo.jpg

CircuitPython is an open source, educational derivative of MicroPython, support and developed by Adafruit Industries.

Comparing ease of use, it goes a step further on the basis of MicroPython.

When the development board running CircuitPython firmware is connected to the PC, the PC will immediately recognize it as a USB storage disk.

And the python script file can be copied to this disk to allow the program to run on the development board.

Modern operating systems and home PCs support USB storage disks, this allows users to use it out of the box.

Of course, in order to use REPL, a serial communication software needs to be installed, or a text editor that supports this function, such as Mu editor.

The CircuitPython community provides an extremely rich peripheral driver library, APIs documentation, and tutorials.

Even if there is no programming foundation, no hardware foundation, you can quickly get started from scratch.

CircuitPython does not support some microcontroller-specific libraries such as timer and hardware interrupt, nor does it support the multi-threaded _thread library. It only provides the asyncio library for writing concurrent code.

The code is very compatible between microcontrollers supported by CircuitPython and single-board computers (SBCs) supported by Blinka. This is thanks to its efforts to unify APIs.

BPI-Bit-S2 CircuitPython Download Page

Mu Editor

How to install tinyUF2 firmware:

To enable your BPI-Bit-S2 device to flash via USB-CDC.

Connect it to the computer via USB, hold BOOT button, press RST button once, then release BOOT button.

In the Install, Repair, or Update UF2 Bootloader section at the bottom of the page, follow its instructions to download and install tinyUF2 firmware.

How to install CircuitPython firmware:

Click the DOWNLOAD .UF2 NOW button on the right side of the page to download the firmware to the local, and then copy it to the disk in BPI-Bit-S2 UF2 Bootloader mode, and it can be used after automatic reset.

Arduino

Arduino logo 1200x350.png

Arduino is an open source embedded hardware and software development platform for users to create interactive embedded projects.

The Arduino integrated development environment (IDE) is the software core of this platform, using the C/C++ programming language to develop projects.

The biggest feature of Arduino is to provide a unified API to develop all microcontrollers it supports, with very good code portability and reusability.

In addition, it simplifies the process of building a development environment, and all the development environments of microcontrollers it supports can be installed and configured with a single click.

It also provides simple one-click mechanisms to compile and upload programs to a microcontroller.

Arduino IDE alsoprovides many example codes, supplemented by a large number of comments, which can help users get started quickly.

A large number of excellent open source projects accumulated in the Arduino community are available for reference and learning, and there are quite a few driver libraries and APIs provided by chip manufacturers as well.

Documents

BPI-Bit-S2 schematic

Easy to buy sample