void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
pinMode(2, OUTPUT);
pinMode(4, OUTPUT);
pinMode(16, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
int pot1 = analogRead(26);
int rt =(pot1/16);
int pot2 = analogRead(25);
int gt =(pot2/16);
int pot3 = analogRead(27);
int bt =(pot3/16);
Serial.print("R: "); Serial.println(pot1);
Serial.print("G: "); Serial.println(pot2);
Serial.print("B: "); Serial.println(pot3);
analogWrite(2, rt);
analogWrite(4, gt);
analogWrite(16,bt);
}