Mittarimato Gadget
This is a little distance display built with an ESP8266, a time-of-flight sensor and an RGB OLED screen. I’m using it to display the height of my standing desk.
Demo video:
Hardware
- CPU: IZOKEE NodeMCU ESP8266 module.
- Distance sensor: Waveshare time-of-flight sensor (VL53L1X). Connected to I2C port 0, address 0x29.
- Display: Waveshare 0.95inch RGB OLED (SSD1331). Connected over HSPI.
Wiring diagram:
Software
The main pieces of the software are:
distance_sensor.cc
: Sensor driver, which provides the distance measurement.rainbow_fx.cc
: Palette-based graphics effects and 2x antialised text rendering.display.cc
: SPI display driver.main.cc
: Main measurement and rendering loop.
On my hardware, the animation updates at about 50 fps.
First, install the ESP8266
SDK.
Update the env
file with the path to your SDK installation.
After that, you can build and flash the program like this:
$ . ./env
$ cmake -B build
$ ninja -C build flash
$ ./monitor
Downloads
- Source code ยท https://github.com/skyostil/mittarimato