6. Embedded Programming

This week's assignment was to write a program for a microcontroller development board to interact (with local input &/or output devices) and communicate (with remote wired or wireless devices)

Group assignment

XIAO-RP2040

Features RP2040
CPU Dual-core ARM Cortex-M0+
Clock speed Up to 133 MHz
Bit depth 32-bit
Storage 264KB of SRAM, and 2MB of on-board Flash memory
I/O pins 30 GPIO pins
Power 1.8V - 5.5V
Dimensions 20x17.5x3.5mm
Bluetooth No
WIFI No
How to program USB mass-storage boot mode, drag-and-drop programming
Special Functions USB 1.1 Host/Device, 8 Programmable I/O (PIO) state machines

The comparation with other chips is documented in Fab lab Ibero's gorup page: Fab lab Ibero

Programming the XIAO-RP2040 in Arduino

At the top left corner theres an option to change the board and port. There I just selected the XIAO-RP2040 and the usb port to the chip.

Coding

The XIAO has a Neopixel LED incorporated into it, so for my code, I decided to use three buttons to change the colors of the Neopixel Led. In order to code the Neopixel I download the Adafruit NeoPixel library. Sorce code: Code

Testing my code

To test my code and circuit I first used a protoboard, once I confirmed that the circuit worked I soldered the components together and then connected them to my PCB using the pins.

Results