Go Down

Topic: Re: CapSense Library (Read 36254 times) previous topic - next topic


The tqfp package has two additional analog pins (6 and 7), which do not work as digital pins, but last I checked, the pro mini does not break out these pins. It should be possible to use these for capacitive sensor inputs, but not using the capsense library.


How can I turn an entire tree or at least a small shrub into a sensor?  I did a few tests with a 1M resistor and it worked for the one leaf I had it had the wire clipped to.

Is it a matter of needing more power to create a field around the tree or is there another way of modifying the sensitivity that I haven't found.  My students did some tests with conductivity in the tree and got great results with the leaves conducting as long as they touched the GND.



Hey Paul,

Great work on the capsense library. Very cool stuff!

I'm interested in using this for an open source hardware kit we're working on, and we're wondering what the license you've chosen to use for your source code. It doesn't seem like any license was specified, only that you are retaining copyright for the source code. Would you be willing to release the source code under the GPL?

Please feel free to contact me off list if you prefer.

Matthew Beckler
layne a-t wayneandlayne d-o-t comp


Hey everybody! A while back I noticed some strange stuff going on with an unconnected analog pin so I decided to investigate. I put a 1Mohm resistor on analog pin 0 and then alligator clipped a piece of tin foil to the other end. Wrote a quick sketch that reads the pin and prints it via serial connection. When I'm not touching it, it stays pretty consistent in the 300-500 range. However, as soon as I touch it, it goes nuts. 0, 1023, and everywhere inbetween in no particular order. Forgive me if I seem ignorant, but isn't this an easier solution for a touch sensor? It may not be as scientifically correct or accurate, but it seems to do the job.


Hello all,

Does anyone know for sure whether the CapSense library works with Arduino Mega 2560?



I want to connect 6 capacitive sensors to 6 lights. The value of the capacitive sensors determines the output of the lights on the pwm ports. The sensors are connected to digital ports: 0, 1, 12, 8, 4, 2.
The resistors to ports 7 & 13. All pwm ports are used.
The atmega 328 duemilanova is used.
Currently the program only works with 1 sensor. Has anyone got an idea/code to solve this issue?


hi all,

i am a new bie to arduino and  i ve been  trying  the capSense lately...  this is what i get in serial output

3756      230740      33      -2
3756      230540      116      -2
3755      230289      110      -2
3756      230553      0      -2
3758      231348      45      -2
3757      230828      0      -2
3757      230964      0      -2
3756      230613      0      -2
3755      230575      55      -2
3755      230441      0      -2
3756      230609      21      -2
3754      230262      0      -2

is that -2 referring to the timeout error?

i ve connected a 5x5 aluminium foil to a 22 ohms resistor to pin no 5 and 3 in arduino..
please help... lost here...

Go Up