Professional Documents
Culture Documents
h>
void setup()
pinMode(4,INPUT);//button 1
pinMode(5,INPUT);//button 2
lcd.setCursor(0, 1);
delay (2500);
delay (2500);
lcd.clear();
lcd.setCursor(9, 0);
void loop()
{
float VOLTAGEVALUE = (analogRead(A0));//read ADC value at A0
// if voltage change is higher or lower than 0.5 of previous value (to avoid fluctuations)
lcd.print(VOLTAGEVALUE*2.42);
lcd.print("V ");
if (voltageadjust<250)
delay(30);
if (digitalRead(5)==LOW)
{
if (voltageadjust>0)
delay(30);
delay(200);