What is CircuitPython?
CircuitPython is a programming language designed to simplify experimenting and learning to program on low-cost microcontroller boards. It makes getting started easier than ever with no upfront desktop downloads needed. Once you get your board set up, open any text editor, and get started editing code. It’s that simple.
Step 1. Update the UF2 Bootloader
- Plug your Feather M4 into your computer using a known-good USB cable. Make sure it is a DATA SYNC cable, and NOT for CHARGING ONLY. Now the LED on your board may light up.
- Press the RESET button twice
- The LED light on your board may turn from red to green.
- FEATHERBOOT will appear on your laptop. Now see what is inside INFO_UF2.TXT. You may find the bootloader version of your board.
- Update your bootloader version to the latest https://circuitpython.org/board/feather_m4_express/ (scroll to the bottom of the page, find UF2 Bootloader)
- Drag and drop the .ur2 file you have just download to the drive. The drive will eject and the red light on the board will flicker a few times. Then the green light will be on and the FEATHERBOOT will reappear.
- Now check the info_uf2.txt again, see if you are updated.
Step 2. Set up CircuitPython
1. Download the latest version!
Here is the CircuitPython for FeatherWing M4 Express: https://circuitpython.org/board/feather_m4_express/
If the file you downloaded that matches the board name ends in uf2 then you want to continue with this section.
2. Install CircuitPython
Now find the uf2 file you downloaded. Drag that file to the boot drive on your computer.
The lights should flash again, FEATHERBOOT will disappear and a new drive will show up on your computer called CIRCUITPY.
Now you are ready to explore! To create your artwork here is the final step to get ready…
Step 3. Install Mu Editor
Mu is a simple code editor that works with the Adafruit CircuitPython boards. It’s written in Python and works on Windows, MacOS, Linux and Raspberry Pi. The serial console is built right in so you get immediate feedback from your board’s serial output.
1.Download Mu from https://codewith.mu.
2. Follow the installation instructions. You may refer this website for more information. https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython
3. Please select CircuitPython mode after you start your Mu Editor for the first time.
Your current mode will show up on the bottom right corner, next to the ⚙️ icon.
You can switch your mode by clicking the Mode button at the top bar.
But let’s select CircuitPython for now.
This warning alert may show up if you are not connecting to your board yet.
To avoid this warning, plug in a board and ensure that the CIRCUITPY drive is mounted before starting Mu.
Load the code.py in your CIRCUITPY drive, this will be the code that store and run on your board!
Ready to explore?
Here is the link to tutorials. You can find some examples for trying out the pins and modules.