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:48
353 octets ajoutés
,
21 février 2022 à 00:48
→Input Reading
Ligne 23 :
Ligne 23 :
>>> p = Pin( 15, Pin.IN )
>>> p = Pin( 15, Pin.IN )
>>> p.value()
>>> p.value()
−
0
<--- Pin tied to GND
+
0
<--- Pin tied to GND
>>> p.value()
>>> p.value()
−
1
<--- Pin tied to 3.3V
+
1
<--- Pin tied to 3.3V
</syntaxhighlight>
</syntaxhighlight>
+
+
When the Pin is neither tied to GND, neither to 3.3V, then the pin voltage is said "floating".
+
+
The logical state of a floating pin is unpredictable, it may be High, it may be Low... we don't know.
+
+
To avoids that issue, the best is to use a pull-up resistor. Many microcontroler have internal pull-up resistor (it just needs to be activated).
== Analog Reading ==
== Analog Reading ==
Admin
Bureaucrates
,
Administrateurs
30 186
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