Skip to content

Commit b2bfd5c

Browse files
authored
Merge pull request #396 from srobo/chore/fix-kch-leds
2 parents 8a60447 + bcf8911 commit b2bfd5c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

programming/sr/leds/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ Each of the LEDs can be set to one of 8 colours:
2626

2727
~~~~~ python
2828
# Set LED A to red
29-
R.kch[UserLED.A] = Colour.RED
29+
R.kch.leds[UserLED.A] = Colour.RED
3030

3131
# Set LED B to cyan
32-
R.kch[UserLED.B] = Colour.CYAN
32+
R.kch.leds[UserLED.B] = Colour.CYAN
3333

3434
# Turn LED C off
35-
R.kch[UserLED.C] = Colour.OFF
35+
R.kch.leds[UserLED.C] = Colour.OFF
3636
~~~~~
3737

3838
The available colours are:
@@ -52,11 +52,11 @@ Alternatively you can set the red, green and blue channels for a given LED separ
5252

5353
~~~~~ python
5454
# Turn on the blue segment of LED A
55-
R.kch[UserLED.A].b = True
55+
R.kch.leds[UserLED.A].b = True
5656

5757
# Turn off the red segment of LED B
58-
R.kch[UserLED.B].r = False
58+
R.kch.leds[UserLED.B].r = False
5959

6060
# Turn on green segment of LED B
61-
R.kch[UserLED.B].g = True
61+
R.kch.leds[UserLED.B].g = True
6262
~~~~~

0 commit comments

Comments
 (0)