Ligne 33 : |
Ligne 33 : |
| </syntaxhighlight> | | </syntaxhighlight> |
| | | |
− | This will work the same with any GPIO pins. | + | This will work the same with any GPIO pins. |
| + | |
| + | A LED wired to GP20 could be controled by modifying only one line of code. |
| + | |
| + | [[Fichier:ENG-CANSAT-FEATHER-PICO-HowTo-22.png]] |
| + | |
| + | <syntaxhighlight lang="python"> |
| + | from machine import Pin |
| + | led = Pin(20, Pin.OUT) |
| + | led.value(1) # Switch on the LED |
| + | led.value(0) # Switch off the LED |
| + | </syntaxhighlight> |
| | | |
| == Input Reading == | | == Input Reading == |