Skip to content
Snippets Groups Projects
Commit 06c96cac authored by rahix's avatar rahix
Browse files

Fix LED code-block, maximum allowed value is 31

parent 5df11f2c
No related branches found
No related tags found
No related merge requests found
......@@ -42,10 +42,13 @@ Sobald du eine Zeile hast, die mit _>>>_ beginnt, bist du bereit, mit Python zu
### Eine LED zum blinken bringen
Es gibt ein paar nette Python-Funktionen, die bereit stehen, um die LEDs zum blinken zu bringen. Importieren wir erstmal die Bibliothek mit diesen Funktionen, indem wir eingeben:
```import leds```
Als nächstes bringen wir eine der raketen zum leuchten, indem wir eingeben:
```leds.set_rocket(0, 100)```
```python
import leds
# Als nächstes bringen wir eine der raketen zum leuchten, indem wir eingeben:
>>> leds.set_rocket(0, 31)
```
Die erste Zahl, die eingegeben wird, ist der Index, um die Raketen-LED auszuwählen. Du kannst auswählen zwischen 0 (blau, links), 1 (gelb, mittel) und 2 (grün, rechts)..
......
......@@ -40,10 +40,13 @@ Once you have a line starting with _>>>_, you are ready to start programming in
### Making an LED blink
There are some neat python functions prepared for making the leds blink. Let's import the library containing these functions by typing:
```import leds```
Next, we light up one of the r0kets by typing:
```leds.set_rocket(0, 100)```
```python
import leds
# Next, we light up one of the r0kets by typing:
>>> leds.set_rocket(0, 31)
```
The first number entered is the index for selecting the r0ket LED. You can choose between 0 (blue, left) , 1 (yellow, middle) and 2 (green, right).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment