Mar 28, 2015 #1 J jokester4u Junior Member level 2 Joined Nov 26, 2013 Messages 20 Helped 1 Reputation 2 Reaction score 0 Trophy points 1 Activity points 124 I got an error after placing PId library file Its say \Arduino\libraries\PID_v1\PID_v1.cpp:8:22: fatal error: WProgram.h: No such file or directory Please someone could help me regarding this problem The code im running Code: #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 myPID.SetMode(AUTOMATIC); } void loop() { Input = analogRead(0); myPID.Compute(); analogWrite(3,Output); }
I got an error after placing PId library file Its say \Arduino\libraries\PID_v1\PID_v1.cpp:8:22: fatal error: WProgram.h: No such file or directory Please someone could help me regarding this problem The code im running Code: #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 myPID.SetMode(AUTOMATIC); } void loop() { Input = analogRead(0); myPID.Compute(); analogWrite(3,Output); }