Embedded programming
Assignment
I assembled a QPAD-XIAO board around a Seeed XIAO RP2040, then programmed it in Arduino so the OLED, NeoPixels, and capacitive pads all talked to each other. I later ran a gridworld on the same board with a policy trained off-device.
Soldering
I started by assembling the board. The soldering iron at the REEF at Harvard was not good. I also could not use the EE lab, because I have never taken an electrical engineering class at Harvard. I went to MIT instead. The microscope there was very helpful, and the iron was very good.
Program
After the board was together, I flashed Adafruit NeoPixel code to the XIAO RP2040 to confirm the LEDs worked. I then used Claude to write the OLED display code with Adafruit GFX and SSD1306. Last, I wired the capacitive pads to those functions so I could test the plumbing: a pad press should change the light mode, and the screen should show what the board is doing.
I did the work in the Arduino IDE. I compiled the sketch there and flashed it over a USB-C to USB-C cable.
The sketch runs three modes, Solid, Breathe, and Rainbow, and talks to the computer over USB as a UF2 device.
Doom
I also flashed Doom onto the RP2040. The OLED showed the title screen, but this was a standard porting job, so I stopped there.
Gridworld
CS1840 overlap: 16×8 OLED MDP. Q0 new map, Q1 auto/manual, Q2–Q5 nudge.
One path was tabular Q-learning on a local observation (neighborhood + goal heading), exported as a lookup table. It was not generalisable: 3% success on held-out maps. The agent got stuck in 1-cell squeezes and kept walking sideways into walls.
I switched to a tiny net on the full wall grid, trained off-device by imitating BFS, then flashed the weights.