Dot-Dot-Tilt! in action

Check out this video to see Dot-Dot-Tilt! in action:

Background

My project was vaguely inspired by Adafruit's animated LED sand from 2018, but I fell in love with the 128x64 pixel dot matrix LCD by Display Visions and wanted to take motion-sensitive programming a little further. Low-power components like the unlit LCD and the SAMD21 micontroller mean that I could design for a coin cell battery and fit it all into a pleasingly small form factor.

These technologies all come with their own constraints that make this a unique little platform:

  • Pixels that show up only briefly on the LCD appear faint, so the animations need to retain a slow, dreamy quality
  • The SAMD21 is relatively fast at 48 MHz, but the 32 KB RAM is tight. Fitting in 2048 particles for the sand simulation needed some acrobatics!

Join the hacking

The project's Github repository includes everything you need to buid it yourself: schematic and PCB layout, outlines for the case's laser-cut layers, and of course the source code. Do clone it, and hack away! Let me know what fun inertial games you come up with.

To compile and upload the code, you will need VS Code with the PlatformIO plugin.

Here are some of the design's rough edges at v1:

  • If I designed the PCB now, I'd put the motion sensor in the middle for improved handling.
  • The holes for the SAMD21 breakout board are a bit small, making it hard to insert the part. They ought to be enlarged.
  • In my build I removed the power-on LED from the SAMD21 board, but forgot to remove it from the motion sensor. It's a waste of the coin cell's limited power.
  • There's no easy way to access the SAMD21 board's Reset terminals. I'd try and find a way to make them accessible, because it can get annoying when your script locks up and it's hard to upload a new version without resetting. (It's a bit of a silly design on the Xiao board's part if you ask me.)

Lots of fun to be had with the code:

  • Improve gesture detection! The sudden left/right flip works, but it could be better...
  • Hide the invisible edges of the rotating cube
  • Lots of new games! Like recreating the Coriolis space station docking bit from Elite, or a balance board maze :)