Hello,
I would like to take a voltage reading with one of the ADC pins via analogRead.
By default ESP32 uses whatever its current + rail voltage is as a reference,if I am not mistaken.
However, I need to use the built in 1V1 reference instead.
On arduino, this is very easy, I simply do this:
analogReference(INTERNAL);
And thats it. All analogReads now use the built in 1V1 as reference.
This code however, will not compile on the ESP32. So how do I set the ADC on the esp32 to use the built in 1V1 reference instead?
thank you
How to use the built in 1V1 reference?
-
- Posts: 9769
- Joined: Thu Nov 26, 2015 4:08 am
Re: How to use the built in 1V1 reference?
You indeed are mistaken; it's the other way around. The ESP32 always uses the 1.1V reference, but you can switch in some attenuators to enlarge the available range.
Who is online
Users browsing this forum: Google [Bot] and 30 guests