Modifications
Sauter à la navigation
Sauter à la recherche
← Modification précédente
Modification suivante →
MicroPython-esp32-evb
(voir la source)
Version du 24 mai 2021 à 23:22
106 octets ajoutés
,
24 mai 2021 à 23:22
→Utiliser le bouton utilisateur
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>
Admin
Bureaucrates
,
Administrateurs
29 922
modifications
Menu de navigation
Outils personnels
Se connecter
Espaces de noms
Page
Discussion
Variantes
Affichages
Lire
Voir le texte source
Voir l’historique
Plus
Rechercher
Navigation
ARDUINO
RASPBERRY-PI
[:: PI Hacking ::]
Particle.IO
Micro Python
Imprimante 3D
Actualités
Modifications récentes
Page au hasard
Aide
Outils
Pages spéciales
Version imprimable