I am using ESP32 WROOM-32 board.
When i read data from light sensor, the first value that i get is correct. After that i change the voltage on the pin. But the data that I get is still on the same level (changes just a little bit).
The input voltage is around 0.5v. I get:
I change the voltage to 1.8v. But i still get the same:
I reset and start the program starting with 1.8v input:
I change the input to 0.5v, but still get the same:
This is the code:
Code: Select all
from machine import ADC from machine import Pin light_sensor = ADC(Pin(33)) light_sensor.atten(ADC.ATTN_11DB) while True: print(light_sensor.read())
What is the problem?