Capacitive Sensing Library being ignored by arduino UNO.

Hey all,
i want to measure the fuel level of my fuel tank,and wanted to use the Capacitive Sensing Library , so i downloaded it from Arduino Playground - CapacitiveSensor

and as soon i start arduino,this error pops up..

The library CapacitiveSensor-b297f3f cannot be used.
Library names must contain only basic letters and numbers.
(ASCII only and no spaces, and it cannot start with a number).

Can anybody tell me what is happening here and how to troubleshoot it?

Rename the folder to get rid of the '-b297f3f' bit.

Ok....now that was simple. :stuck_out_tongue_closed_eyes:

Thank you.

You're welcome. I think it's something to do with github's versioning system.

ok now..i have written my program, and i am posing it here,because its in reference to the capsense library.
After i press the compile button,it shows an error ,
capSense does not name a type?...i have included the library
#include<CapSense.h>

its saved as a .h file.

i tried changing the brackets to quotes but it didnt work out.

jay2012:
ok now..i have written my program, and i am posing it here,because its in reference to the capsense library.
After i press the compile button,it shows an error ,
capSense does not name a type?...i have included the library
#include<CapSense.h>

its saved as a .h file.

i tried changing the brackets to quotes but it didnt work out.

Using the IDE's sketch menu/import library see if the capsense library is listed in the Contributed section of the list offered. If it is not listed there you did not save the library in the proper directory and/or the proper manner.

Lefty

it is listed there.

Is it listed as 'CapSense', or 'CapacitiveSensor'?

ok,here is what i have written now, realizing my mistake with writing the library name,now after i compile it there is an error in the
long value = CS_4_2.CapacitiveSensor(30); line,saying that invalid use of class CapacitiveSensor

i am sorry but i am new to this library.

#include <CapacitiveSensor.h>
CapacitiveSensor CS_4_2 = CapacitiveSensor(4,2); // 10 megohm resistor between pins 4 & 2
void setup()
{
  CS_4_2.set_CS_AutocaL_Millis(0xFFFFFFFF); // turn off autocalibrate on channel 1
  Serial.begin(9600);
}
void loop()
{
  long start = millis();
  long value  = CS_4_2.CapacitiveSensor(30);
  Serial.println(value);
  delay(100);
}

Have you looked at any of the examples that came with the library?

sorry , got my mistake,
should use long total = cs_4_2.capacitiveSensor(30);
thanks guys.should have looked at the examples first.

Hi there, I am having a similar problem. I have recently downloaded the capacitive sensing library from this link Arduino Playground - HomePage and paste this library in the libraries section in arduino. However when I start up arduino, the following error below pops out :

" The library "arduino-libraries -CapacitiveSensor-3e33f75" cannot be used.
Library names must contain only basic letters and numbers.
(ASCII only and no spaces, and it cannot start with a number)"

So, I have followed the instruction on this page by renaming the folder by removing the "-3e33f75" and still the same error pops out but this time saying " The library "arduino-libraries -CapacitiveSensor" cannot be used.
By the way i am using Arduino Uno and running it on Arduino Version 1.0.5
Is there any other ways to troubleshoot this problem? Your help would be kindly appreciated.

I fail to see what is so difficult to understand about the message. It says you can't use dashes in the name. It doesn't say that you can't use more than two. So, removing one was 1/3rd of what you needed to do.

Manage to get rid of the error by removing the dashes. However when i try to verify the program in the example that came with the library, the following error occur
CapacitiveSensor does not name a type
CapacitiveSensorSketch:12: error: 'CapacitiveSensor' does not name a type
CapacitiveSensorSketch.pde: In function 'void loop()':
CapacitiveSensorSketch:22: error: 'cs_4_2' was not declared in this scope

I have already checked the IDE sketch menu/import library and the capacitivesensor library is listed under the Contributed section so that means that i have save the library in the correct place but why does the error above occur?

I managed to find the solution, thanks for all the help

Hi,

I have the same issue.

Do you have any solutions ?

Thanks a lot

I have the same issue.

The, use the same solution.

As Starter92, I have the following message :

CapacitiveSensor does not name a type
CapacitiveSensorSketch:12: error: 'CapacitiveSensor' does not name a type
CapacitiveSensorSketch.pde: In function 'void loop()':
CapacitiveSensorSketch:22: error: 'cs_4_2' was not declared in this scope

That's my issue and there is no solution if I well understand.

Thanks a lot

That's my issue and there is no solution if I well understand.

Of course there is a solution. Install the correct library in the correct place.

If you want to continue to not provide the sketch you are trying to compile. you can continue to struggle by yourself.

Hi all
I downloaded the library from
http://playground.arduino.cc//Main/CapacitiveSensor?from=Main.CapSense
I renamed the folders to be called "CapacitiveSensor" and uzipped in the folder

the problem is that for some spooky action it generates the following folder
Documents\Arduino\libraries\CapacitiveSensor\libraries\CapacitiveSensor

What you need to do is to just put the CapativeSensor directly in the libraries folder, avoiding the redundancy.

I went to file-> examples-> CapacitiveSensor...->CapacitiveSensorSketch wich is the example of the library and compilled perfectly.

I hope that helpled to make it clear.

CapacitiveSensorSketch:12: error: 'CapacitiveSensor' does not name a type