#define led1 16
#define led2 17
#define input1 34
#define input2 35
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
}
void loop() {
int val1=0;
int val2=0;
val1=analogRead(input1);
val2=analogRead(input2);
val1=map(val1, 0,4095, 0,255);
val2=map(val2, 0,4095, 0,255);
Serial.println(val1);
analogWrite(led1, val1);
Serial.println(val2);
analogWrite(led2, val2);
// put your main code here, to run repeatedly:
delay(1000); // this speeds up the simulation
}