Modifications
Sauter à la navigation
Sauter à la recherche
← Modification précédente
Modification suivante →
PowerSwitchTail-Usage
(voir la source)
Version du 1 août 2024 à 16:41
195 octets ajoutés
,
1 août 2024 à 16:41
→Raspberry-Pi Pico
Ligne 15 :
Ligne 15 :
== Utilisation ==
== Utilisation ==
−
=== Raspberry-Pi Pico ===
+
=== Raspberry-Pi Pico
et MicroPython
===
Voici un exemple de raccordement sur le GPIO 6 (GP6) du Raspberry-Pi Pico
Voici un exemple de raccordement sur le GPIO 6 (GP6) du Raspberry-Pi Pico
Ligne 27 :
Ligne 27 :
<syntaxhighlight lang="python">
<syntaxhighlight lang="python">
−
x
+
from machine import Pin
+
import time
+
+
p = Pin( Pin.board.GP6, Pin.OUT, value=False )
+
# Active le relais
+
p.on()
+
# attendre 10 secondes
+
time.sleep( 10 )
+
# désactiver le relais
+
o.off()
</syntaxhighlight>
</syntaxhighlight>
Admin
Bureaucrates
,
Administrateurs
32 920
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