Arduino/Codes/libraries/PID_v1/PID_v1.cpp: In constructor 'PID::PID(double*, double*, double*, double, double, double, int)':
Arduino/Codes/libraries/PID_v1/PID_v1.cpp:26: error: 'millis' was not declared in this scope
Arduino/Codes/libraries/PID_v1/PID_v1.cpp: In member function 'void PID::Compute()':
Arduino/Codes/libraries/PID_v1/PID_v1.cpp:43: error: 'millis' was not declared in this scope
I have got Mac, so I created a folder called Arduino in Documents, then there I created libraries, which is the place with the folder with PID libraries. Overall root is like that:
Documents/Arduino/libraries/PID_v1/
I am using some other external libraries in the same way, but they do not seem to produce any errors.
I have got Arduino Mega 2560. Yea, I was trying to install those libraries from different places and some of them got left in the libraries menu. Is there way to delete them, thou I don't think it solves the problem?
Just tried using 1.0.4 and it is still not working. For some reason when Arduino is giving me an error it points out the root to PID folder, which I did not use for libraries, it kind of creates a new one somewhere else...
Arduino/Codes/libraries/PID_v1/PID_v1.cpp: In constructor 'PID::PID(double*, double*, double*, double, double, double, int)':
Arduino/Codes/libraries/PID_v1/PID_v1.cpp:26: error: 'millis' was not declared in this scope
Arduino/Codes/libraries/PID_v1/PID_v1.cpp: In member function 'void PID::Compute()':
Arduino/Codes/libraries/PID_v1/PID_v1.cpp:43: error: 'millis' was not declared in this scope
sketch_jan04a:8: error: 'PID' does not name a type
sketch_jan04a.ino: In function 'void setup()':
sketch_jan04a:17: error: 'myPID' was not declared in this scope
sketch_jan04a:17: error: 'AUTOMATIC' was not declared in this scope
sketch_jan04a.ino: In function 'void loop()':
sketch_jan04a:23: error: 'myPID' was not declared in this scope
this is the error I am getting
and, this is my code:
#include "Arduino.h" #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;