Installing CircuitPython
CircuitPython is a variant of MicroPython developed by Adafruit. It is a simplified version of Python, specifically for microcontrollers. CircuitPython is a great way to quickly and easily get started with programming microcontrollers. In this tutorial, we will show you how to install CircuitPython on your senseBox MCU-S2.
Web-Browser!
You can only use the Web-Installer with Google Chrome or Microsoft Edge.
Installing CircuitPython
To install CircuitPython on your senseBox MCU-S2, follow these steps:
- Visit the CircuitPython Download Page.
- Connect your senseBox MCU-S2 to your computer using a USB cable.
- Hold down the Boot button on the senseBox MCU-S2 and then press the Reset button. Release the Boot button.
- Click on the
OPEN INSTALLER
button and selectFull CircuitPython X.X.X Install
(X.X.X represents the latest CircuitPython version). - Click
Next
and connect to your senseBox MCU-S2 in the next menu. Click theConnect
button and selectESP32-S2
as the device. - Click
Continue
and wait for the flash to be erased and the combined.bin file to be flashed. This process may take a few minutes. - Press the Reset button on the senseBox MCU-S2 to start the bootloader. A new drive named
senseBox
will appear. - Click
Select Bootloader Drive
and choose thesenseBox
drive. - CircuitPython will now be loaded onto the MCU. After a few seconds, you should see a new drive named
CIRCUITPY
. - CircuitPython has been successfully installed. The Web-Installer does not indicate that the process is complete, so you can simply close the Web-Installer.
- You can now use CircuitPython on your senseBox MCU-S2.
Hello World Programm
To verify that CircuitPython has been successfully installed, we will show you a simple Hello World program.
- Visit the CircuitPython Editor.
- Connect your senseBox MCU-S2 to your computer using a USB cable.
- Connect to your senseBox MCU-S2 via
USB
. - Click on
Connect to Device
and selectsenseBox MCU-S2 ESP32S2
as the device. You may need to allow the editor to access your senseBox MCU-S2. - Click on
Select New Folder
and choose theCIRCUITPY
folder. - You may need to allow file editing.
- Click on
Use CIRCUITPY
. - Click on
Open
and open thecode.py
file. - The file should already contain some example code. If not, insert the following code:
print("Hello World!")
- Click on
Save + Run
. You should now seeHello World!
in the console.
Uninstalling CircuitPython
If you want to uninstall CircuitPython from your senseBox MCU-S2 to use Arduino again, follow these steps:
- Enter bootloader mode by briefly pressing the Reset button and then briefly pressing the Boot button. The RGB LED should now light up green.
- Download the flash-arduino.uf2 file.
- Copy the
flash-arduino.uf2
file to thesenseBox
drive. - The senseBox MCU-S2 will now restart, and you can use Blockly or Arduino as usual.