20 lines
		
	
	
		
			453 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			453 B
		
	
	
	
		
			Python
		
	
	
	
	
	
import time
 | 
						|
import uasyncio as asyncio
 | 
						|
import Hardware as HW
 | 
						|
import Screens
 | 
						|
 | 
						|
#Async
 | 
						|
loop = asyncio.get_event_loop()
 | 
						|
 | 
						|
modus = 0
 | 
						|
screens = (Screens.ClockScreen(),\
 | 
						|
            Screens.SettingsScreen())
 | 
						|
async def run_screens():
 | 
						|
    global modus,screens
 | 
						|
    while True:
 | 
						|
        await screens[modus%len(screens)]
 | 
						|
        for i,b in enumerate(HW.buttons):
 | 
						|
            b.setCallbacks()#Clear Callbacks
 | 
						|
        modus += 1
 | 
						|
 | 
						|
loop.run_until_complete(run_screens()) |