In a previous blog post I introduced to you the D-duino ESP8266 boards. In this blog post, I’ll show you a small Arduino code which is providing the basic functionality for my next projects.
What’s in the box
I am using the awesome WifiManager library. I will handle the configuration and connection to a WiFi network. If the ESP is unconfigured or the AP is not reachable, it will start an access point by its own. You can connect to this AP and a caption portal will open. Scan for networks, select one and enter the password. The configuration will be saved in the EEPROM. No need to set the credentials inside of your code.
Over-the-Air update is also implemented. This makes it very easy to update the code without connecting the MCU via USB to the host. It’s also faster than serial uploads.
Last part is of course the OLED display. I am using the ESP8266_SSD1306 library. It has some very nice features like progress bars, several graph commands (lines, shapes etc.), pictures and of text.