//YWROBOT
//Compatible with the Arduino IDE 1.0
//Library version:1.1
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
int value;
int value2;
byte s[]{
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
B11111
};
void setup()
{
lcd.init(); // initialize the lcd
lcd.init();
// Print a message to the LCD.
lcd.backlight();
lcd.createChar(0,s);
}
void loop()
{
value = analogRead(A0);
value = map(value,1023,0,15,0);
value2 = 0;
while(value2<=value){
lcd.setCursor(value2,0);
lcd.write(0);
value2++;
}
lcd.print(" ");
}