Proximity Sensor Issues HELP

Hi,

I am fairly new to Arduino and am trying to set up a proximity sensor using Bare conductive paint.

My circuit is as follows- using pins 2 and 4 (2 being sensor pin) with a 10m ohm resistor bridging the two. then have a connection from pin 2 to the conductive paint. I used the Bare Conductive tutorial online to set this up. I then downloaded the CapSense library from Arduino and successfully installed this library. It uploads to the Arduino fine and all seems to be working well.

However, in my serial monitor, I have 4 columns of data. Not only this but a new line of data displays every 4 seconds even if I have no delay. Only one column of numbers changes with proximity to the sensor, but it is not regular and seems to change even when my hand is not near the paint.

I have tried using lower resistors (about 10 diff types) with no change. Have attached print screen of my code (which I have double checked is exactly the one from the CapSense lib) and also of my serial monitor display.

Please can someone help! Im sure it is quite a simple thing that I am just missing!?

Arduino CapSensor.pdf (538 KB)

Please can someone help! Im sure it is quite a simple thing that I am just missing!?

Yes, it is something simple you are missing. Some code.