byte potPin = 26;
#include <LiquidCrystal.h>
LiquidCrystal lcd(18, 5, 17, 16, 4, 0);
void updateLcd(int data)
{
lcd.clear();
lcd.setCursor(0,0);
// int analogdata = analogRead(potPin);
lcd.print("analog data:");
lcd.println(data);
}
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
pinMode(potPin,INPUT);
}
void loop() {
int analogdata = analogRead(potPin);
Serial.print("analog data : ");
Serial.println(analogdata);
updateLcd(analogdata);
// put your main code here, to run repeatedly:
delay(1000); // this speeds up the simulation
}