## How to start with QPad RP 2040 and Micropython - Download and install Thonny ([portable or instalable](https://thonny.org/)) - follow this tutorial (all to the bottom) - https://wiki.seeedstudio.com/XIAO-RP2040-with-MicroPython/ - ![image](https://hackmd.io/_uploads/rkmXmHsvWg.png) - **important part: how to add the board and how to load toolchain** - important part: how to save a library in the rp2040 - **dont continue until you finish the tutorial** - Now you can try the example of Kris - before try, you need to add the library from neil: https://academy.cba.mit.edu/classes/input_devices/step/RP2040/hello.steptime.RP2040.py - Remember how to add a library: copy/paste code in thonny/save as/rpi/steptime.py Now you can play around with micropython code in the board Useful tips: - remember to stop the running program before making anything - if you try the program with the play button, you are running it from the computer. If you want this program to be the main program in the board, press "file-save as..." and select the Raspberry Pi option. Then store it as "main.py". This file name is the program that will start from the boot of the board - if you modify any program that you stored in the RP2040 and want to upload the modifications, just press "save" button. ## Switch From micropython to Arduino (same as the beginning): - Unplug the board - press the BOOT button and plug the board - open Arduino - Select the board (Xiao RP2040) and the port (COMX) - Copy and paste the blink example ([from the qpad git](https://gitlab.cba.mit.edu/quentinbolsee/qpad-xiao/-/blob/main/code/Arduino/blink_RP2040/blink_RP2040.ino)) - upload code When you upload the sketch, then the RP204 now has the bootloader ready JUST for Arduino Now you can try the examples of the Qpad for Arduino: https://gitlab.cba.mit.edu/quentinbolsee/qpad-xiao/-/tree/main/code/Arduino ## How to start with Qpad RP 2040 and Arduino - Open Arduino IDE and load the Xiao boards, following the Adrian tutorials: https://fabacademy.org/2020/labs/leon/students/adrian-torres/fabxiao.html - In Preferences, we will add this URL in the additional boards box: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json - then go to toosl-boards-board manager and search for "pico". Install the first one - after open again tools-board and search in the dropdown menu the "Seed Xiao RP2040" - Then in the phisic board, press the BOOT button while connect on the usb port. a window pop up, you can close. - ![image](https://hackmd.io/_uploads/S1zQzSoDWx.png) - In arduino go to tools-port and choose the "UF2 board" - Then open a sketch in Arduino (you can use the blink for this board in the examples of QPAD: https://gitlab.cba.mit.edu/quentinbolsee/qpad-xiao/-/blob/main/code/Arduino/blink_RP2040/blink_RP2040.ino?ref_type=heads) - Then press the upload button. From this point, your board can only accept code from the Arduino IDE. You have changed the bootloader.