//voltage divider


#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20 , 4);
int voltageSensor = A0;

float vOUT = 0.0;
float vIN = 0.0;
float R1 = 30000.0;
float R2 = 7500.0;

void setup() {
  lcd.init();
  lcd.begin(16, 2);
  lcd.backlight();
  lcd.setCursor(0,0);
  lcd.print("Folly Begins");

}

void loop() {
int voltage = analogRead(voltageSensor);
vOUT = (voltage * 5.0) / 1024.0;
vIN = vOUT / (R2/(R1+R2));
lcd.setCursor(0,0);
lcd.print(vIN);
lcd.print("V");
delay (500);


}