tiny snakes on a board
a micropython speedrun through a few projects i’d been meaning to try, with whatever i had lying around.
i gave a talk about these at python wa. altogether, it was about three days of tinkering. none of them are finished, but there was enough to show what i’d been trying.
wifi as an input
i’d seen a repo using wifi to detect motion and got curious. i needed an excuse to try it, so i decided to see if i could use it as an input for curdle.sh, my terminal wordle game.
the setup was a pair of esp32s sending and receiving packets, with a third to help synchronise the captures. i tried moving my hands and arms, then walking in and out of the room. at some point it was 3am.
there was plenty of data. i just couldn’t get anything repeatable enough to tell the movements apart, and i’d had enough of collecting it. that one’s parked for now.
radar morse code
after the wifi attempt, i bought a cdm324 radar module. the idea was to wave my hand at it and use the movements to enter morse code.
i used an amplifier and some components i had lying around, then added a little oled for the signal check and menus. there’s also a speed readout and a practice mode for the gestures.
it does decode morse, though it still misses things. i haven’t finished getting it to work as an input on my mac either.
the lightsticks
i love the crowd lightshows at twice concerts. i have a v1 and a v3 lightstick, so i wanted to have a go at controlling them myself.
someone had already done a teardown of the v3: maximus64/candybong. that saved me a lot of time. i couldn’t find the same sort of documentation for the v1, so i went digging through the companion app for the commands.
i got both sticks changing colour from an accelerometer connected to an esp32. move the board, change the colours. i also put the v1 on a nightlight stand and got it working with apple home, although that part uses esp-matter rather than micropython.
other boards worth a look
i used esp32-s3 boards for this. if you’re picking something up to have a go, there are a few other options.
-
seeed xiao esp32s3: the same s3 chip on a tiny board, with wifi, ble and plenty of memory. a good option when space is tight.
-
seeed xiao esp32c3: the same small board size, with a simpler chip and less memory. worth a look for basic sensor projects that need wifi or ble.
-
raspberry pi pico 2 w: an rp2350 board with wifi, bluetooth and easy micropython setup. an option outside the esp32 family; get the w version for wireless.
i haven’t tested these as replacements in the demos. check the pinout and firmware first, especially for wifi csi.
anyway
micropython made it pretty easy to just try things. i could change some code and see what the board did straight away. ai helped a lot too, especially when i was asking whether some component from the drawer would do. finding it in the drawer was still my problem.
the source code for all the projects will be released shortly. i’ll add links here as they’re ready.
the slides are made with manim, manim-slides, marimo and reveal.js. the font is tt2020.