Modifications

Sauter à la navigation Sauter à la recherche
1 600 octets ajoutés ,  20 mai 2017 à 13:44
aucun résumé de modification
Ligne 2 : Ligne 2 :     
{{traduction}}
 
{{traduction}}
 +
 +
Want to use something more than switches and wires for your inputs? You can turn PiFace Digital 2’s inputs into touch sensitive inputs that can turn anything that conducts electricity, like bananas or people, into a switch, similar to how MakeyMakeyTM works.
 +
 +
To use touch sensitive inputs, you need to configure PiFaceTM Digital 2 so it can sense the tiny amount of electricity that flows through these objects.
 +
 +
For each input you want to use, connect a 25-40M ohm resistor between the input pin and 5V.
 +
 +
== Désactiver les pull-ups ==
 +
Then turn off input pullups, which can be done in one of two ways:
 +
 +
=== En utilisant l'émulateur ===
 +
If you are using the emulator, click Input Pullups in the Enable menu (so there is no tick).
 +
 +
[[Fichier:PiFace2-Manuel-touch-00.jpg]]
 +
 +
=== En utilisant python ===
 +
If instead you are using Python, disable the pullups on each pin with the following:
 +
 +
digital_write_pullup(pin_number, state)
 +
 +
Where state is set to 0 to turn pull ups off for the pin pin_number.
 +
 +
== Tester l'entrée "tactile" ==
 +
Connect a wire to each touch sensitive input, then connect a single wire to GND on the PiFaceTM Digital 2.
 +
 +
While holding the wire connected to GND, touch the wire connected to the input with another part of your body. When you are in contact with both wires, you complete the circuit, which the PiFace Digital 2 can detect, (as shown in the emulator or by performing a digital_read using Python).
 +
 +
Try connecting one touch input wire to a piece of fruit (par exemple: une banane).
 +
 +
Now, when you hold the GND wire and touch the banana you complete the circuit.
    
{{PiFace2-Manuel-TRAILER}}
 
{{PiFace2-Manuel-TRAILER}}
29 917

modifications

Menu de navigation