The use of the ESP8266 in the world of IoT

User avatar
By Andrew Grande
#38222 Hi guys,

I'm trying to understand if anything is wrong with my code. I have an OLED display wired, but when I try to save some power and send SSD1306 the DISPLAY_OFF command, 2 things happen:
  • The comms LED on ESP8266 is constantly lit (odd, see here https://youtu.be/mdC_2jkhn_g?t=14s )
  • The power draw doesn't drop - the USB detector device still shows 20mA no matter whether display is on or off

Here's how I turn the display off: https://github.com/aperepel/iot-esp8266 ... n.ino#L172
Any pointers or ideas?
User avatar
By al1fch
#38455 Hi Andrew Grande !

for a real 'display off' (6µA in my case ) you have to deal with chargepump (SSD1306 datasheet, fig 8-16 and 8-17)
'displayoff ' then chargepump off
Code: Select all  display.sendCommand(DISPLAYOFF);
  display.sendCommand(CHARGEPUMP);
  display.sendCommand(0x10);

and then for display on : charge pump on, then 'display on'
Code: Select all  display.sendCommand(CHARGEPUMP);
  display.sendCommand(0x14);
  display.sendCommand(DISPLAYON);