//Potentiometer is connected to GPIO 34 (Analog ADC1_CH6)
const int potPin = 34;
const int ldrPin = 39;
float potValue = 0;
int ldrValue = 0;
unsigned long last_time = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
if (millis() - last_time > 10) {
potValue = analogRead(potPin);
ldrValue = analogRead(ldrPin);
Serial.printf("0.00, 3.30, %d, %.2f\n", ldrValue, potValue);
last_time = millis();
}
}