Writing Your First Code in MicroPython
PRE-REQUISITES:
- Thonny IDE - Ensure the Thonny IDE is installed on your computer. Once installed and setup is complete, proceed with the next steps.
- MicroPython uf2 loaded PicUNO RP2040
- USB-C Cable
- Atrivatech PicUNO.py library for MPY - Click Here to View
STEPS:
- Connect the PicUNO and open Thonny IDE.
- Once the interpreter is chosen, open a new file.
- Copy and paste PicUNO.py
- Save as → on RP2040 device → picuno.py
- Once saved, open a new file.
- Copy and paste any sample code provided in the code repository for reference.
NOTE: If you want your MPY code to run on startup, ensure it is saved as main.py on the PicUNO. That way the Thonny IDE need not be opened at all times.
VIDEO REFERENCE:
If the video does not load above, you may watch it directly at: youtube.com