B4R Question ESP01 analog read

petr4ppc

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
Declaration:
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,
p4ppc
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…