#include<Wire.h>
#include<Servo.h>
#include<LiquidCrystal.h>
#include<LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
Servo myservo;
int pos = 0;
void setup() {
// put your setup code here, to run once:
lcd.init();
lcd.backlight();
myservo.attach(9);
}
void loop() {
// put your main code here, to run repeatedly.
lcd.setCursor(0,0);
lcd.print("Hello World");
lcd.scrollDisplayLeft();
delay(250);
for(pos = 0; pos<=180; pos+=1){
myservo.write(pos);
delay(15);
}
for(pos = 180; pos>=0; pos-=1){
myservo.write(pos);
delay(15);
}
}