PiFace2-Manuel-touch

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

Créer une entrée tactile

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).

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.


Traduction basée sur le document Technical DataSheet produit par Farnell

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.