Week 04: Embedded Programming¶
FabDino Game on QPAD¶
FabDino I constructed QPAD and created the Dinosaur game you see on Chrome browser.
Assignments¶
Group assignment:¶
- Demonstrate and compare the toolchains and development workflows for available embedded architectures
- Document your work to the group work page and reflect on your individual page what you learned
Individual assignments¶
- Browse through the datasheet for a microcontroller
- Write and test a program for an embedded system using a microcontroller to interact (with local input &/or output devices) and communicate (with remote wired or wireless connections)
1. Group Assignment¶
We compared several toolchains and development workflows in group assignment and documented on FabLab Kannai group work page.
I learned the historical method using “Programmer” and some other methods and learned that writing embedded program to a board was a lot of fuss in the past and it is getting easier and easier.
2. Browse through the datasheet for a microcontroller¶
I am very interested in the Seeed xiao family of boards, and wanted to find out which board is suitable to drive motors and handle camera information. I used Google NotebookLM to ask questions about the data sheets. It seems Seeed Studio XIAO ESP32S3 Sense is the best choice as it natively supports OV2640 or OV3660 camera sensors and has high processing power.
Seeed Studio XIAO ESP32S3 Sense
| Feature | Description |
|---|---|
| Processor | Dual-core Xtensa LX7 (32-bit) running up to 240 MHz |
| Memory | 512 KB SRAM (Internal) + 8 MB PSRAM (External) |
| Storage | 8 MB Onboard Flash |
| Wireless | 2.4GHz Wi-Fi & Bluetooth Low Energy (BLE) 5.0 |
| Sensors | Camera Sensor (OV2640 or OV3660 supported), Digital Microphone |
| I/O Pins | 11 PWM Pins / 9 Analog Pins |
| Interfaces | I2C, UART, SPI |
| Power | Battery Charge Chip & LED onboard |
| Dimensions | 21 x 17.5 mm (Standard XIAO form factor) |
3. Developing “FabDINO” game on QPAD¶
FabLab Kannai Instructor Tamiya-san kindly shared with me the “QPAD” board from the instructor workshop in Norway. I soldered necessary parts and then developed a Dinosaur game.
3-1 Constructing the board¶
QPAD board is based on the Xiao RP2040, the IC was developed by the Raspberry Pi Foundation and is the same one used for Raspberry Pi Pico. I used Thonny as IDE and MicroPython as the programming language, as they go well together. Here is the process.
3-2 Install MicroPython via Thonny¶
- Download and install Thonny IDE
- Hold the BOOT button on the Xiao RP2040, then press RST — it mounts as a USB drive called
RPI-RP2 - In Thonny: Tools → Options → Interpreter, select MicroPython (Raspberry Pi RP2040), then click Install or update MicroPython
- After flashing, the board restarts and Thonny connects automatically

3-3 Programming in Thonny¶
I wrote main.py in MicroPython with the help of Gemini. I gave Gemini, the circuit diagram of QPAD and sample micropython code developed by Quentin, and put the following prompt.
Develop the dinosaurs game you see on Google Chrome when it’s off-line, based on the given circuit and the sample program.
The game is created with the following loop:
- Touch input — reads a capacitive touch pin (pin 26) using
STEPTIME; a spike abovethresholdtriggers a jump - Physics — simple gravity moves the dino rect; it clamps to the ground
- Cactus — a rect scrolls left by 2 px each frame; resets when it exits the screen
- Collision — AABB check; on hit, NeoPixel flashes red and “GAME OVER” appears on the OLED
- Win condition — survive 3 jumps → NeoPixel flashes blue, congratulations screen
I saved the helper libraries (ws2812.py, steptime.py, ssd1306.py) to the Pico via Thonny’s file panel, then saved main.py as the entry point.

3-4 Finished Game¶
I slightly adjusted the game speed and jump height, and here it is the finished game.
Checklist¶
- [x] Linked to the group assignment page
- [x] Browsed and documented some information from a microcontroller’s datasheet
- [x] Programmed a board to interact and communicate
- [x] Described the programming process(es) you used
- [x] Included your source code
- [x] Included ‘hero shot(s)’
Digital Files¶
References¶
Copyright¶
Copyright 2026 Fumiko Toyoda - Creative Commons Attribution Non Commercial Source code hosted at gitlab.fabcloud.org