Please explain the code
can explain me.
i noob in programming want learn, btw can understand of codes bit confuse.
this our project pulse oximeter. using a
nellcor max-a http://www.medical-supplies-equipment-company.com/product/ppf/id/13446/new_prod_full.asp
where output of pulse oximeter inputed in arduino decimila.
another question: how can change aref higher voltage? light led.
thanks in advance!
here's code:
moderator edit: [code] [/code] tags added.
i noob in programming want learn, btw can understand of codes bit confuse.
this our project pulse oximeter. using a
nellcor max-a http://www.medical-supplies-equipment-company.com/product/ppf/id/13446/new_prod_full.asp
where output of pulse oximeter inputed in arduino decimila.
another question: how can change aref higher voltage? light led.
thanks in advance!
here's code:
code: [select]
int ledpin = 13;
int sensorpin = 0;
doouble alpha =0.75;
int period = 20;
double change = 0.0;
void setup()
{
pinmode(ledpin,output);
serial.begin(115200);
}
void loop()
{
static double oldvalue = 0;
static double oldchange = 0;
int rawvalue = analogread(sensorpin);
double value = alpha * oldvalue + (1-alpha)*rawvalue;
digitalwrite(ledpin,(change<0.0 && oldchange >0.0));
serial.println(value);
oldvalue= value;
oldchange =change;
delay(period);
}
moderator edit: [code] [/code] tags added.
what mean
change aref of what?
quote
how can change aref higher voltage?
change aref of what?
Arduino Forum > Using Arduino > Programming Questions > Please explain the code
arduino
Comments
Post a Comment