I am using an Arduino Leonardo. I have the IDE installed and can run the blink example sketch. So the board and IDE seem to be working. I want to run capacitive sensor so I downloaded and unziped to libraries folder the capacitive library.
I get the following errors when it compiles:
CapacitiveSensorSketch:12: error: ‘CapacitiveSensor’ does not name a type
CapacitiveSensorSketch:13: error: ‘CapacitiveSensor’ does not name a type
CapacitiveSensorSketch:14: error: ‘CapacitiveSensor’ does not name a type
CapacitiveSensorSketch.pde: In function ‘void setup()’:
CapacitiveSensorSketch:18: error: ‘cs_4_2’ was not declared in this scope
CapacitiveSensorSketch.pde: In function ‘void loop()’:
CapacitiveSensorSketch:25: error: ‘cs_4_2’ was not declared in this scope
CapacitiveSensorSketch:26: error: ‘cs_4_6’ was not declared in this scope
CapacitiveSensorSketch:27: error: ‘cs_4_8’ was not declared in this scope
I think the problem is it can not find the include file as sketch does not show that in orange. see below
- CapitiveSense Library Demo Sketch
- Paul Badger 2008
- Uses a high value resistor e.g. 10M between send pin and receive pin
- Resistor effects sensitivity, experiment with values, 50K - 50M. Larger resistor values yield larger sensor values.
- Receive pin is the sensor pin - try different amounts of foil/metal on this pin
I have looked at example on web but can not figure what I am doing wrong.