I have been working with the capacitive sensor library on teensy and arduino (Mac OSX and Windows 7) for about 6 months. Everything has been fine, however, for the past week I have been unable to get the sensor to work. To try and track down the problem I have uploaded the example sketch to my teensy 3.6 and it continues to behave inappropriately - serial prints extremely slowly (about a second for each each update) and only gives the value -2. I am using the set up exactly how it it is described in the examples using a 1MOhm resistor. I have tried this on 2 teensys that work perfectly fine when the CapSensor library is not invoked. I have also tried it on multiple versions of arduino (1.6.13 and 1.8).
I've been scouring the internet for a similar issue but haven't had any luck yet. I would greatly appreciate any help that could be offered. Thanks!