Do this:
- Download https://github.com/arduino-libraries/CapacitiveSensor/zipball/master
- (in the Arduino IDE) Sketch > Include Library > Add .ZIP Library > select the downloaded file > Open
After that the error should go away. If it doesn't then let me know.
gdjidje:
also the file is opened in the arduino software in a tab next to my sketch?
When you use the #include <CapacitiveSensor.h> syntax the libraries folders are searched for the file but the sketch folder is not. If you want to #include a file from the sketch you need to use a different syntax:
#include "CapacitiveSensor.h"
That will cause the sketch folder to be searched first, then the libraries folders. But don't do that. You shouldn't dump libraries into the sketch folder as a workaround for not knowing how to properly install a library. If you actually have a good reason for wanting to put the library in the sketch folder that's fine but you should be aware that often libraries will require modification in order to do this. Those modifications can easily be done but at this point when you're struggling just to get your sketch to compile it's just an unnecessary complication.