
Rose
Tap-sensitive rose badge
I used an ATtiny24a microcontroller and an LIS3DH accelerometer as the motion sensor.
I used 8 GPIO pins of the microcontroller to drive the charlieplex LED matrix, which didn’t leave enough pins left to drive the accelerometer. So I discovered the LIS2/3 series accelerometers have a feature where you can drive SPI in half-duplex mode, combining the MOSI and MISO pins into a single “MOMI” pin. I also have the interrupt pin shared with the clock pin in pulse mode with a resistor, since I only enable interrupts while the device is sleeping and therefore not using the SPI clock.
I made the world’s worst 3D map of the rose petals to generate an animation of a sphere expanding and intersecting with the LEDs in virtual 3 dimensions.