//YWROBOT
//Compatible with the Arduino IDE 1.0
//Library version:1.1
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
int value = 0;
String stringOne = " ";
void setup()
{
lcd.init(); // initialize the lcd
// Print a message to the LCD.
lcd.backlight();
lcd.setCursor(0,0);
lcd.print("Hello, world!");
//lcd.setCursor(0,1);
// lcd.print("Ywrobot Arduino!");
pinMode(A3, INPUT);
Serial.begin(115200);
}
void loop()
{
value = analogRead(A3);
Serial.println(value);
lcd.setCursor(0,0);
lcd.print("Hello, world!");
lcd.setCursor(0,1);
value = map(value, 136, 365, 10, 125);
value = constrain(value, 10, 125);
lcd.print(value);
if (value > 999)
{ stringOne = "";}
if (value > 99)
{ stringOne = " ";}
if (value > 9)
{ stringOne = " ";}
if (value < 10)
{ stringOne = " ";}
lcd.print(stringOne);
}