Imported Libraries fail to Highlight?

After using the
#include <‘Library’.h>
command some of the built in libraries on my Arduino UNO do not highlight (go from black font to gold font registering that the library has been successfully called).

I have verified that the specific libraries are in my documents/Arduino/Libraries folder, according to the specifications on this website.

I attached an example screen to illustrate the problem. I am running Arduino 1.0.5 on a Windows 7 OS. The Arduino is on COM3, and is able to successfully compile code (besides these library functions). This is the only issue I have been having. Any other info needed let me know. Thanks!

Imported libraries (such as CapacitiveSensor) also fail to highlight. Ideally I would like to be able to successfully import other libraries.

This is a function of the contributed library. If it has a text file included that define what words and what colors to highlight then it will do so in your sketch code, but if not then it will not highlight items. So it’s not caused by the IDE but rather the coding of the library itself.


But the code won’t compile, seemingly because the referenced library isn’t registering. (see attached).

Unfortunately, .png files don’t scroll, so we can’t see all of the error messages.

This is the code:

#include <CapacitiveSensor.h>

 * 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

CapacitiveSensor   cs_4_2 = CapacitiveSensor(4,2);        // 10M resistor between pins 4 & 2, pin 2 is sensor pin, add a wire and or foil if desired
CapacitiveSensor   cs_4_6 = CapacitiveSensor(4,6);        // 10M resistor between pins 4 & 6, pin 6 is sensor pin, add a wire and or foil
CapacitiveSensor   cs_4_8 = CapacitiveSensor(4,8);        // 10M resistor between pins 4 & 8, pin 8 is sensor pin, add a wire and or foil

void setup()                    
   cs_4_2.set_CS_AutocaL_Millis(0xFFFFFFFF);     // turn off autocalibrate on channel 1 - just as an example

void loop()                    
    long start = millis();
    long total1 =  cs_4_2.capacitiveSensor(30);
    long total2 =  cs_4_6.capacitiveSensor(30);
    long total3 =  cs_4_8.capacitiveSensor(30);

    Serial.print(millis() - start);        // check on performance in milliseconds
    Serial.print("\t");                    // tab character for debug windown spacing

    Serial.print(total1);                  // print sensor output 1
    Serial.print(total2);                  // print sensor output 2
    Serial.println(total3);                // print sensor output 3

    delay(10);                             // arbitrary delay to limit data to serial port 

These are the error messages when I try to compile:

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

Where did you install the library? Those error messages mean that you didn't install the library or it's in the wrong place.

I am using a Lenovo Windows 7 Professional. The file path is:


Could the fact that 'My Documents' is stored under the name 'Libraries' be affecting the code compiling? I can't change the name unfortunately.