Created Wed, 21 Nov 2012 09:38:51 +0000 by ajitnayak
Wed, 21 Nov 2012 09:38:51 +0000
I am using mpide IDE i wanna run simple analog read function from Arduino but due voltage level difference i could not able get answer
Please let me know how can ac
void setup()
{
Serial.begin(9600);
pinMode(A0, INPUT) ;
}
void loop()
{
int Sensor_Value;
int voltage;
voltage = Sensor_Value * (3.3 / 1023.0);
delay(100);
Serial.println("voltage is :\n");
Serial.println(voltage);
}
Wed, 21 Nov 2012 10:49:00 +0000
It would help if you were actually reading the input. The voltage difference has nothing to do with it.
Where, in your program, is there an analogRead() ?
Here's a list of very elemental mistakes: