mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Correct RGBLED recipe
This commit is contained in:
@@ -310,18 +310,18 @@ led = RGBLED(red=9, green=10, blue=11)
|
||||
led.red = 1 # full red
|
||||
led.red = 0.5 # half red
|
||||
|
||||
led.rgb = (0, 1, 0) # full green
|
||||
led.color = (0, 1, 0) # full green
|
||||
|
||||
led.rgb = (1, 0, 1) # magenta
|
||||
led.rgb = (1, 1, 0) # yellow
|
||||
led.rgb = (0, 1, 1) # cyan
|
||||
led.rgb = (1, 1, 1) # white
|
||||
led.color = (1, 0, 1) # magenta
|
||||
led.color = (1, 1, 0) # yellow
|
||||
led.color = (0, 1, 1) # cyan
|
||||
led.color = (1, 1, 1) # white
|
||||
|
||||
led.rgb = (0, 0, 0) # off
|
||||
led.color = (0, 0, 0) # off
|
||||
|
||||
# slowly increase intensity of blue
|
||||
for n in range(100):
|
||||
led.blue += 0.01
|
||||
led.blue = n/100
|
||||
sleep(0.1)
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user