Platinum Partner

Keep Light On Using Thread

Copy-paste version

import e32, miso, thread
running = 1
def lighton():
  while running:
    miso.reset_inactivity_time()
    e32.ao_sleep(5)

thread.start_new_thread(lighton, ())
# end by set running = 0


2 functions (lighton, lightoff) version.

import e32
import miso
import thread

flag = 1
def _lighton():
    while flag:
        miso.reset_inactivity_time()
        e32.ao_sleep(5)

def lighton():
    thread.start_new_thread(_lighton, ())

def lightoff():
    global flag
    flag = 0

{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}