saugat
Newbie level 2
I am trying to step down 40V dc supply using voltage divider circuit to 5 volts proportionally and the output voltage is to displayed on 16X2 lcd. I am always getting 0.0 on lcd, though i think my program is perfect.
I tried a lot but can not figure out what is the error in this circuit.
Please help me out.
Thanks in advance..
Here is my circuit
And here is my arduino code:
I tried a lot but can not figure out what is the error in this circuit.
Please help me out.
Thanks in advance..
Here is my circuit
And here is my arduino code:
Code:
#include<LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
void setup()
{
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
lcd.print("ADC value");
}
void loop()
{
lcd.setCursor(0,1);
float value = analogRead(A0)*5.0/1024.0;
lcd.print(value);
}
Last edited by a moderator: