B4R Question ESP01 analog read


Well-Known Member
Licensed User
Longtime User
Dear friends,

I have not found some information how to use ADC with ESP01.
This is the reason why I want to please you for help.

I am using ESP01, I have potentiometer connected to pin GPIO2
d2.Initialize(2, d2.MODE_INPUT)
then I am reading ADC value in timer:
ADC reading:
Dim adcvalue As UInt = d2.AnalogRead

And I get in LOGS only two values: 1023 and 0

Please, how I can read ADC value with ESP01?
Best regards,