23 lines
551 B
Python
23 lines
551 B
Python
import time
|
|
import uasyncio as asyncio
|
|
import Hardware as HW
|
|
import Screens
|
|
|
|
#Async
|
|
loop = asyncio.get_event_loop()
|
|
|
|
async def run_screens():
|
|
InitScreen = Screens.InitHandsScreen()
|
|
await InitScreen
|
|
|
|
modus = 0
|
|
screens = (Screens.ClockScreen(),\
|
|
Screens.RingtoneSettingsScreen())
|
|
while True:
|
|
HW.buzzer.playSound(HW.Buzzer.BEEP)
|
|
await screens[modus]
|
|
for b in HW.buttons:
|
|
b.setCallbacks()#Clear Callbacks
|
|
modus = (modus+1)%len(screens)
|
|
|
|
loop.run_until_complete(run_screens()) |