#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
#include <LiquidCrystal_I2C.h>
#include <ESP32Servo.h>
#define I2C_ADDR 0x27
#define LCD_COLUMNS 16
#define LCD_LINES 2
LiquidCrystal_I2C lcd(I2C_ADDR, LCD_COLUMNS, LCD_LINES);
char auth[] = "w7TWdkYQ-j4bUiH2ueSd3Rg1hzMXR6HS";
char ssid[] = "Wokwi-GUEST";
char pass[] = "";
Servo myservo;
BLYNK_WRITE(V3) {
myservo.write(param.asInt());
}
void setup()
{
// Debug console
Serial.begin(9600);
Blynk.begin(auth, ssid, pass, "iot.serangkota.go.id", 8080);
lcd.init();
lcd.backlight();
myservo.attach(15);
}
void loop()
{
Blynk.run();
lcd.setCursor(0, 0);
// print message
lcd.print(myservo.read());
}