Inspired by Mat Smith’s MQTT Lightswitch I started working on an MQTT Controller. I shamelessly ripped Mat’s idea in using the same 256×64 OLED and MQTT for the backend. But instead of using an Arduino Mega I opted for an ESP8266. Had a NodeMcu 1.0 in my parts bin and since it has the most pins available of all ESP chips and it’s easy to breadboard I started hacking away.
Mat has his code available on his GitHub but the u8glib library he is using hasn’t been ported to the ESP-8266 Arduino IDE at this time. So </shameless rip>..
The OLED uses an SSD1322 IC and fortunately, there is a working Adafruit GFX driver available for the ESP. This enabled me to build it all up on a breadboard and write some working code. Because the ESP8266 is somewhat limited in available I/O ports I need to really think about which direction I’m going regarding the user input. For now, I have converted an Arduino Pro Mini to 3.3v and connected it to a rotary encoder and a 12 port MPR121 Capacitive Sensor. It talks to the ESP8266 over a simple serial connection. The idea is to mount it all behind a printed plexiglass front panel hoping the MPR121 will work reliably through plexiglass.
The ESP8266 also drives a couple of WS2812b RGB LEDs. They can be individually driven using Adafruits NeoPixel library.
Not sure if it will ever work, but we’ll see.
Made a demo video. Still using an MCP23008 i2c I/O expander in this demo.
Transferred it to stripboard and moved from the MCP23008 to a slave Arduino with an MPR121 sensor and WS2812b LEDs.
Update: The OLED Controller has made it to the prototype phase.