const int pot1Pin = 34; // Pote 1 (GPIO 34)
const int pot2Pin = 35; // Pote 2 (GPIO 35)
int pot1Valor = 0;
int pot2Valor = 0;
float voltage1 = 0.0;
float voltage2 = 0.0;
void setup() {
Serial.begin(115200);
delay(1000);
}
void loop() {
pot1Valor = analogRead(pot1Pin);
pot2Valor = analogRead(pot2Pin);
voltage1 = (pot1Valor * 3.3) / 4095.0;
voltage2 = (pot2Valor * 3.3) / 4095.0;
// Salida para Serial Plotter (separada por tabulación o espacio)
// El primer valor tiene un color y el segundo otro
Serial.print("Pot1: ");
Serial.print(voltage1, 2);
Serial.print("\t"); // Tabulación
Serial.print("Pot2: ");
Serial.println(voltage2, 2);
delay(100); // Delay corto para ver bien el gráfico
}