datacute / Tiny4kOLED

Library for an ATTiny85 to use an SSD1306 powered, double buffered, 128x32 pixel OLED, over I2C
MIT License
264 stars 39 forks source link

How to enter sleep mode? #13

Closed chenxianming closed 5 years ago

chenxianming commented 5 years ago

The library running on attiny85 very well? But i have to control power use, how to sleep the screen power and soft wake? chip avr/sleep? or use oled.on / off function?

datacute commented 5 years ago

Use oled.off() before you sleep the ATTiny85, and oled.on() afterwards.

The SSD1306 retains all its settings and display ram, and uses next to no power when it is off.

I've created a coin cell powered game, which sleeps waiting to be woken by the turn of a rotary encoder, and the power drain when asleep is so low I don't need a physical power switch.

chenxianming commented 5 years ago

Thanks. That was great with ssd1306.