DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Keeping The Screen Light On

  • submit to reddit
        Miso library provides a feature to turn your phone's screen light on.
import miso
Read the documentation and download miso from <a href=>here</a>.

To make it always on. You can put the call into a loop
with ao_sleep.
def light_on():
    import miso, e32
    e32.ao_sleep(10, light_on)  # forever loop
light_on()      # always keep light on