#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
bool loopactive= true;
int LED= 9;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
lcd.begin(16, 2);
lcd.backlight();
lcd.setCursor(0,0);
lcd.print("Numbers:");
lcd.print(" ");
pinMode(9, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
lcd.setCursor(0,1);
int x;
for(x=1;x<11;x++)
{
Serial.print(x);
lcd.print(x);
delay(1000);
int pmwValue = map(x, 0, 5, 0, 255);
analogWrite(LED, pmwValue);
}
}