#include <LiquidCrystal.h>
#include <ESP32Servo.h>
Servo motorA;
Servo motorB;
Servo motorC;
int anguloA=0;
int anguloB=0;
int anguloC=0;
LiquidCrystal lcd(22,23,5,18,19,21);
void setup() {
lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print("Frank");
for(int i=1; i<=11; i++){
lcd.scrollDisplayRight();
delay(200);
motorA.attach(12);
motorB.attach(14);
motorC.attach(27);
}
lcd.clear();
Serial.begin(115200);
Serial.println("Franklin");
int x=0;
}
void loop() {
int x;
int y;
int z;
x=analogRead(A3);
y=analogRead(A0);
z=analogRead(A4);
Serial.print("potA=");
Serial.print(y);
Serial.print(" potB=");
Serial.println(x);
Serial.print(" potC=");
Serial.println(z);
delay(100);
lcd.setCursor(0,0);
lcd.print("PotA=");
lcd.print(y);
lcd.setCursor(0,1);
lcd.print("PotB=");
lcd.print(x);
lcd.setCursor(10,0);
lcd.print("PotC=");
lcd.print(z);
anguloA=map(y,0,4095,0,180);
anguloB=map(x,0,4095,0,180);
anguloC=map(z,0,4095,0,180);
motorA.write(anguloA);
motorB.write(anguloB);
motorC.write(anguloC);
}