Modifications

Sauter à la navigation Sauter à la recherche
114 octets ajoutés ,  27 octobre 2024 à 16:44
Ligne 113 : Ligne 113 :  
s_in = Signal( p_in, invert=True )
 
s_in = Signal( p_in, invert=True )
    +
while True:
 +
    # lecture de l'état
 +
    v = s_in.value()
 +
    print( 'PRESS' if v else '---' )
 +
 +
    time.sleep(1)
 
</syntaxhighlight>
 
</syntaxhighlight>
  
32 920

modifications

Menu de navigation