Modifications

Sauter à la navigation Sauter à la recherche
266 octets ajoutés ,  24 mai 2021 à 23:17
Ligne 20 : Ligne 20 :  
rel2.on()
 
rel2.on()
 
rel2.off()
 
rel2.off()
 +
</syntaxhighlight>
 +
 +
== Utiliser le bouton utilisateur ==
 +
 +
Le bouton utilisateur est raccordé sur le GPIO 34.
 +
 +
[[Fichier:MicroPython-esp32-evb-button.png]]
 +
 +
 +
<syntaxhighlight lang="python">
 +
from machine import Pin
 +
from time import sleep_ms
 +
 +
btn = Pin( 34, Pin.IN )
 +
 
</syntaxhighlight>
 
</syntaxhighlight>
  
29 918

modifications

Menu de navigation