PID Basic when compile get error message
hi, when compile pid basic exampleget error message below:
arduino: 1.5.6-r2 (windows xp), board: "arduino uno"
c:\documents , settings\icareuz\my documents\arduino\libraries\pid_v1\pid_v1.cpp: in constructor 'pid::pid(double*, double*, double*, double, double, double, int)':
c:\documents , settings\icareuz\my documents\arduino\libraries\pid_v1\pid_v1.cpp:26: error: 'millis' not declared in scope
c:\documents , settings\icareuz\my documents\arduino\libraries\pid_v1\pid_v1.cpp: in member function 'void pid::compute()':
c:\documents , settings\icareuz\my documents\arduino\libraries\pid_v1\pid_v1.cpp:43: error: 'millis' not declared in scope
this coding:
/********************************************************
* pid basic example
* reading analog input 0 control analog pwm output 3
********************************************************/
#include "arduino.h"
#include <pid_v1.h>
//define variables we'll connecting to
double setpoint, input, output;
//specify links , initial tuning parameters
pid mypid(&input, &output, &setpoint,2,5,1, direct);
void setup()
{
//initialize variables we're linked to
input = analogread(0);
setpoint = 100;
//turn pid on
mypid.setmode(automatic);
}
void loop()
{
input = analogread(0);
mypid.compute();
analogwrite(3,output);
}
******************************************
i try:
-i try using pid_v1 or pid_v1.0.1 library error message.
-i put library inside arduino\libraries\pid_v1\
- try step forum arduno before, still cant slove problem
who can give me idea slove error message? thanks.
arduino: 1.5.6-r2 (windows xp), board: "arduino uno"
c:\documents , settings\icareuz\my documents\arduino\libraries\pid_v1\pid_v1.cpp: in constructor 'pid::pid(double*, double*, double*, double, double, double, int)':
c:\documents , settings\icareuz\my documents\arduino\libraries\pid_v1\pid_v1.cpp:26: error: 'millis' not declared in scope
c:\documents , settings\icareuz\my documents\arduino\libraries\pid_v1\pid_v1.cpp: in member function 'void pid::compute()':
c:\documents , settings\icareuz\my documents\arduino\libraries\pid_v1\pid_v1.cpp:43: error: 'millis' not declared in scope
this coding:
/********************************************************
* pid basic example
* reading analog input 0 control analog pwm output 3
********************************************************/
#include "arduino.h"
#include <pid_v1.h>
//define variables we'll connecting to
double setpoint, input, output;
//specify links , initial tuning parameters
pid mypid(&input, &output, &setpoint,2,5,1, direct);
void setup()
{
//initialize variables we're linked to
input = analogread(0);
setpoint = 100;
//turn pid on
mypid.setmode(automatic);
}
void loop()
{
input = analogread(0);
mypid.compute();
analogwrite(3,output);
}
******************************************
i try:
-i try using pid_v1 or pid_v1.0.1 library error message.
-i put library inside arduino\libraries\pid_v1\
- try step forum arduno before, still cant slove problem
who can give me idea slove error message? thanks.
you need post code trying compile , post link libaries trying use. can compile , see problem is.
all can @ moment there wrong libary file.
all can @ moment there wrong libary file.
Arduino Forum > Using Arduino > Programming Questions > PID Basic when compile get error message
arduino
Comments
Post a Comment