Code for Touch Sensor
NWCCTV
Posts: 3,629
Does anyone know of any code that will work with this sensor: http://www.ebay.com/itm/261758997611?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT ?
I purchased a few of them since they are so cheap and have a project in mind once the rest of my parts get here but I can not get the code in the OBEX http://obex.parallax.com/object/169 to work with it. Thanks for your help.
I purchased a few of them since they are so cheap and have a project in mind once the rest of my parts get here but I can not get the code in the OBEX http://obex.parallax.com/object/169 to work with it. Thanks for your help.
Comments
You just need to read the input pin.
Nothing more is needed, the logic in this object is to create a capacitive sensor with only the prop.
But in the module you bought that is handled by the touch sensor chip.
I believe what rosco_pc is trying to tell you is that you do not need a driver for this device. It senses the touch on its own and outputs a high to indicate the touch. Treat it like a push button
I haven't tested this with anything but based on rosco_pc and Hal's comments I figure it should work.
Those sensors look pretty cool. It looks like you can power them with 3.3V.
If for some reason you power them with 5V you'll need a series resistor between the sensor's output and the Propeller's I/O pin. I'd use something between 3.3k ohm and 10k ohm. Again this is only if using 5V on the sensor's VDD pin. If you use 3.3V you don't need a resistor but a 100 ohm resistor would keep the Prop safe in case there was a code error which set the I/O pin as an output.
Edit: I had left out "+ cnt" in the waitcnt command.
EDIT: However, I was able to get it to work just like a push button. You are correct, these things are kind of cool and pretty cheap too!!!!.
Thanks all for contributing. Now on to my project!!