// include the library code:
#include <LiquidCrystal.h>
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 13, en = 12, d4 = 11, d5 = 10, d6 = 9, d7 = 8;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
int sensorPin = A0; // select the input pin for the potentiometer
int sensorValue = 0; // variable to store the value coming from the sensor
int mV = 0;
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
}
void loop() {
// set the cursor to column 0, line 1
lcd.setCursor(0, 1);
sensorValue = analogRead(sensorPin);
//lcd.print(sensorValue);
// print the number of seconds since reset:
mV = (sensorValue * 5000L) / 1023;
lcd.print("Voltage: ");
lcd.print(mV);
lcd.print(" mV");
delay(300);
lcd.print(" ");
delay(100);
}