Modifications

Sauter à la navigation Sauter à la recherche
462 octets ajoutés ,  20 mai 2017 à 12:09
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}}
29 917

modifications

Menu de navigation