Modifications
Sauter à la navigation
Sauter à la recherche
← Modification précédente
Modification suivante →
ENG-CANSAT-PICO-HowTo
(voir la source)
Version du 21 février 2022 à 00:39
134 octets ajoutés
,
21 février 2022 à 00:39
→Input Reading
Ligne 17 :
Ligne 17 :
== Input Reading ==
== Input Reading ==
−
The
onboard LED is tied to
the
GPIO 25. Here how to control it
.
+
The
following code will read
the
state of the GP15 configured as input pin
.
<syntaxhighlight lang="python">
<syntaxhighlight lang="python">
−
from machine import Pin
+
>>>
from machine import Pin
−
x
+
>>> in = Pin( 15, Pin.IN )
−
x
+
>>> in.value()
−
x
+
0 <--- Pin tied to GND
−
x
+
>>> in.value()
+
1 <--- Pin tied to 3.3V
</syntaxhighlight>
</syntaxhighlight>
Admin
Bureaucrates
,
Administrateurs
29 917
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