I'm testing some ideas to see if a project is doable and successfully created a finger switch using some info on Google. However I accidentally didn't save the sketch and have painstakingly searched for the same script.
The idea is fairly simple. There are two open pins on a breadboard, and when my finger was placed over the top of them to connect them together the circuit was complete and it was able to control the state of another output pin.
If I recall correctly the set up was. Digital Output Pin to first open pin, second open pin to 220 resistor to ground and 5v. I think. However it worked perfectly, when I put my finger on the open pins an led came on. Can anyone help me recreate this.
Just run the Button example sketch, substituting your two wires connected via your finger in place of the switch. I don't know how much resistance your finger will have - you may need to vary the pull-up resistor to find what works, but if you have a resistor that worked previously I suppose it's likely it will work this time too.
Are you sure this project uses your finger to complete the circuit, and didn't just involve pressing the two wires together? The resistance across your finger is likely to be several MOhms and definitely too much to pull down a 220 Ohm resistor.
No, I had it working so that I'd flipped over two breakaway headers into a breadboard and when putting my finger on the two pins the led turned off. In fact that's something I remember, the example was written so that the led turned off when the pins were pressed rather than on. Not sure of that helps.
What you want to look into is called capacitive sensing. Here is the playground post listing the capacitive sensor library: Arduino Playground - CapacitiveSensor
If you are using the Teensy 3.0/3.1 processors, they have some pins that do capacitive sensing directly: Teensy 3.0 arrived
Alternatively, you could get a membrane keypad that doesn't require as much force to press: https://www.adafruit.com/products/1333, or various force sensors: https://www.adafruit.com/products/166.
Or a photo sensor, that when you put your finger over the sensor reports less light: https://www.adafruit.com/products/161 or a short range proximity sensor: https://www.adafruit.com/products/466.
It may be that in your previous testing you had a hidden wiring fault which left the input pin floating when you weren't touching it. In that case it would be very easy for merely touching the wire to alter the input state - but it would be very difficult to get that working reliably. It would be possible to set up a capacitive sensing input, but not using the sort of pull-up circuit you have been using until now.
MichaelMeissner:
What you want to look into is called capacitive sensing. Here is the playground post listing the capacitive sensor library: Arduino Playground - CapacitiveSensor
If you are using the Teensy 3.0/3.1 processors, they have some pins that do capacitive sensing directly: Teensy 3.0 arrived
Alternatively, you could get a membrane keypad that doesn't require as much force to press: https://www.adafruit.com/products/1333, or various force sensors: https://www.adafruit.com/products/166.
Or a photo sensor, that when you put your finger over the sensor reports less light: https://www.adafruit.com/products/161 or a short range proximity sensor: https://www.adafruit.com/products/466.
Hi,
Continuing from MichaelMeissner's comment on using a Standalone Adafruit Capacitive Touch Sensor,
I have been trying to implement its use with a Adafruit Arduino Pro Trinket, with no luck...
Would anyone have any suggestions on setup or layout?