// Potentiometer is connected to GPIO 34 (Analog ADC1_CH6)
const int potPin = 2;
const float GAMMA = 0.7;
const float RL10 = 50;
// variable for storing the potentiometer value
int potValue = 0;
void setup() {
Serial.begin(115200);
delay(1000);
}
void loop() {
float _min = 32;
float _max = 4063;
// 0.1 - 100000
int analogValue = analogRead(potPin);
// float voltage = analogValue / 1024. * 5;
// float resistance = 2000 * voltage / (1 - voltage / 5);
// float lux = pow(RL10 * 1e3 * pow(10, GAMMA) / resistance, (1 / GAMMA));
Serial.println(analogValue);
Serial.print(" ");
// Serial.println(lux);
delay(300);
}