2019 Tech Tutorial Advent Calendar Day 10: OLED Arduino Status Display (Patreon)
Content
If you look at the code for any of my Arduino projects, you'll notice that I make a lot of use of the Serial.print() command. This sends data from the Arduino via the USB serial interface, where it can then be displayed on the Arduino IDE Serial Monitor window on a PC. This a useful way to check the value of any variables, sensor readings, or the overall state of the controller, and is invaluable when writing new code, or debugging strange behaviour.But it can often be useful to be able to read such information directly on the device itself, without needing to plug in a USB cable, or print additonal debug statements. This is true if, for example, you've got an Arduino nested deep in the belly of an escape room puzzle prop. In today's video, I'd like to show you how to use a little (under 1" long) OLED device display which can can provide realtime status information about any aspect of a running sketch.These displays draw very little current, are 3.3V/5V tolerant, can display a surprising amount of information, and use an I2C interface that requires only 2 Arduino pins.I'm using the lcdgfx library from https://github.com/lexus2k/lcdgfx which creates the interface to the display itself, and also provides some nice utility functions to create a scrollable menu UI.You can buy a 128x32 pixel board like the one I'm using for about $3 from https://www.banggood.com/custlink/K3vDNrCGJP