Skip to content

Commit 25e38e3

Browse files
authored
Merge pull request #3 from arduino/rgb-fixes
Use renamed color property of RGB LED
2 parents 27650a5 + 2c67afe commit 25e38e3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/rgb_led.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def pulse_led(led):
99
"""
1010
Pulses the LED from off to full brightness and back to off.
1111
"""
12-
print(f"🌈 RGB values: {rgb_led.rgb}")
12+
print(f"🌈 RGB values: {rgb_led.color}")
1313

1414
for i in range(0, 256):
1515
led.brightness = i
@@ -23,13 +23,13 @@ def pulse_colors(led):
2323
Pulses the LED through the colors red, green, blue and white.
2424
"""
2525
# Brightness can also be set via 4th tuple element
26-
led.rgb = (255, 0, 0, 255)
26+
led.color = (255, 0, 0, 255)
2727
pulse_led(led)
28-
led.rgb = (0, 255, 0)
28+
led.color = (0, 255, 0)
2929
pulse_led(led)
30-
led.rgb = (0, 0, 255)
30+
led.color = (0, 0, 255)
3131
pulse_led(led)
32-
led.rgb = (255, 255, 255)
32+
led.color = (255, 255, 255)
3333
pulse_led(led)
3434

3535
device = NiclaSenseEnv()

0 commit comments

Comments
 (0)