rgb up
This commit is contained in:
parent
c5699fe42f
commit
009e87b6b6
6
rgb.py
6
rgb.py
@ -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())
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user