"""Programa que enciende la luz de la pantalla del movil en cuanto se apague y asi infinitamente; bueno hasta que cierres el programa.... Programa creado por M8AX""" import e32 import miso import thread from random import randint flag = 1 luz=1 cuenta=0 poker=0 def tiempo(n): HOR=n/3600 MIN=(n /60)%60 SEG= n % 60 return (str(HOR)+":"+str(MIN)+":"+str(SEG)) 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 appuifw.app.screen = 'full' lucia=randint(15,60) while luz==1: e32.ao_yield() e32.ao_sleep(1) cuenta+=1 poker+=1 if cuenta ==lucia: flag=1 lighton() lucia=randint(13,60) cuenta=0 print "Luz Encendida\n" else: lightoff() print "Tmp. "+tiempo(int(poker))+"\n"