Modifications

Sauter à la navigation Sauter à la recherche
188 octets ajoutés ,  21 août 2024 à 18:24
Ligne 78 : Ligne 78 :  
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
 
from machine import Pin
 
from machine import Pin
−
p = Pin( Pin.board.gp12 )
+
p = Pin( Pin.board.gp12, Pin.IN )
−
p = Pin( Pin.board.GP12 )
      
# Affiche 1 lorsque relâché
 
# Affiche 1 lorsque relâché
Ligne 85 : Ligne 84 :  
print( p.value() )
 
print( p.value() )
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
A noter que le bouton utilisateur (GPIO 12) est également accessible par l'intermédiaire du point de test situé sous le bouton "boot".
 +
 +
'''Cette broche doit être utilisée exclusivement en entrée!'''
    
=== Led NeoPixel ===
 
=== Led NeoPixel ===
32 920

modifications

Menu de navigation