Modifications

Sauter à la navigation Sauter à la recherche
106 octets ajoutés ,  24 mai 2021 à 23:22
Ligne 30 : Ligne 30 :     
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
from machine import Pin
+
from machine import Pin, Signal
 
from time import sleep_ms
 
from time import sleep_ms
   −
btn = Pin( 34, Pin.IN )
+
btn_pin = Pin( 34, Pin.IN )
 +
btn = Signal( btn_pin, invert=True )
    +
while True:
 +
    print( btn.value() )
 +
    sleep_ms( 200 )
 
</syntaxhighlight>
 
</syntaxhighlight>
  
29 922

modifications

Menu de navigation