#include #include LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x3F for a 16 chars and 2 line display Servo mymotor; void setup() { Serial.begin(9600); lcd.init(); lcd.clear(); lcd.backlight(); // Make sure backlight is on // Print a message on both lines of the LCD. lcd.setCursor(2,0); //Set cursor to character 2 on line 0 lcd.print("Hello world!"); lcd.setCursor(2,1); //Move cursor to character 2 on line 1 lcd.print("LCD Tutorial"); mymotor.attach(8); } void loop() { if (Serial.available()) { lcd.clear(); String pythonSent = Serial.readStringUntil('\n'); int pos = pythonSent.toInt(); mymotor.write(pos); pythonSent = String(pythonSent); lcd.setCursor(0,0); lcd.print("Recieved"); lcd.setCursor(0,1); lcd.print(pos); } }