This commit is contained in:
Tomas Krejci 2024-05-21 01:45:44 +02:00
parent c5699fe42f
commit 009e87b6b6

6
rgb.py
View File

@ -39,12 +39,14 @@ async def off():
led_g.duty_u16(0) # 0 = off
led_b.duty_u16(0) # 0 = off
async def main():
async def test():
print("RGB demo")
print("Press Ctrl-C to exit")
await uasyncio.sleep(1)
print("RGB power:", rgb_pwr)
print("RGB initializing...")
await init()
await uasyncio.sleep(1)
while True:
print("RGB off")
await set(0, 0, 0)
@ -62,7 +64,7 @@ async def main():
await set(1, 1, 1)
await uasyncio.sleep(1)
asyncio.run(main())
asyncio.run(test())