Modifications
Sauter à la navigation
Sauter à la recherche
← Modification précédente
Modification suivante →
PiFace2-Manuel-Python
(voir la source)
Version du 20 mai 2017 à 12:09
462 octets ajoutés
,
20 mai 2017 à 12:09
→Entrées
Ligne 50 :
Ligne 50 :
== Entrées ==
== Entrées ==
+
You can read the value of an input pin like this:
+
pfd.input_pins[1].value
+
+
Try running the above command with the second switch pressed and then again with it unpressed and you should get different results.
+
+
== Port input/output ==
+
You can read the whole input port by reading the value of the input_port attribute:
+
+
pfd.input_port.value
+
+
Or set the outputs for the whole port by setting the value of the output_port attribute:
+
+
pfd.output_port.value = 0xAA
{{PiFace2-Manuel-TRAILER}}
{{PiFace2-Manuel-TRAILER}}
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