Modifications

Sauter à la navigation Sauter à la recherche
294 octets ajoutés ,  21 février 2022 à 03:08
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 ==
29 918

modifications

Menu de navigation