int pot = 4;
int waarde ;
int motor = 5;
int snelheid;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
pinMode(pot, INPUT);
}
void loop() {
waarde = analogRead(pot);
Serial.println(waarde);
snelheid = waarde/16;
Serial.println(snelheid);
analogWrite(motor,snelheid);
delay(500); // this speeds up the simulation
}