PID name does not exist

hey guys i need some help with the pid library. i downloaded it from here

i put it in the libraries folder in the sketch book, imported it to the arduino program and everything seems great except i get the error message pid name does not exist. I have even tried the pid basic example and get the same error.

i have reinstalled arduino multiple times still same message
i restart arduino after i import the library and still the same message.

can someone help please?



Please post the code that gives the error and confirm the name and exact location of the PID library folder.

 * PID Basic Example
 * Reading analog input 0 to control analog PWM output 3

#include <PID_v1.h>

//Define Variables we'll be connecting to
double Setpoint, Input, Output;

//Specify the links and initial tuning parameters
PID myPID(&Input, &Output, &Setpoint,2,5,1, DIRECT);

void setup()
  //initialize the variables we're linked to
  Input = analogRead(0);
  Setpoint = 100;

  //turn the PID on

void loop()
  Input = analogRead(0);

library location: documents/Arduino/libraries

I changed the file name to PID

At last. Code that actually tries to use the PID library.
Your library appears to be in the right place but

I changed the file name to PID

why ?
Change it back to match the name in the #include. That is how the IDE know where to find it.

Sorry I should have said I changed the main folder that contains the .h .cpp and examples to pid. Anyways I changed the main folder to PID_v1 and am still getting the error PID does not name a type where it first says pid in the code after the #include

Clearly there's still an issue with the install of the PID library. If restarting the IDE doesn't solve it, I'd suggest getting rid of the version you've been adjusting and just reinstall it.

Please post the code with the problem (I'm unclear whether the code you posted is before, during or after any of the renaming changes you mention), give the full file path of your Arduino sketch, and the full file path of the .h file which is named in the #include statement. Also include the compiler output.