// Only works on Chrome
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);

int sensorValue = 0;
float voltage = 0;

void setup() {
  Serial.begin(9600);
  lcd.init();
  lcd.backlight();
  lcd.print("Real voltage:");
  Serial.println("CLEARDATA");
  
}

void loop() {
  // read the input on analog pin 0:
  sensorValue = analogRead(A0);
  // print out the value you read:
  //Serial.print("ADC-level:");
  //Serial.print(sensorValue);
  //Serial.print("     Real voltage:");
  voltage=sensorValue * 5.0 / 1023.0;
  //Serial.println(voltage);
  Serial.print("DATA,TIME,");
  Serial.print(sensorValue);
  Serial.print(",");
  Serial.println(voltage);
  lcd.setCursor(0, 1);
  lcd.print(voltage);
  delay(1000); // Delay a little bit to improve simulation performance

}