How can I get a 1.1 V reference using analogReference()?

Hi!

I just got a R4 minima and want to use 1.1v for analogReference.

I've read this thread several times but don't understand the solution you came up with:

I copied the override to the readVcc function provided in this post. However, I get intVREF1 is not defined.

How did you get this working? Is the only other solution to use external Aref and then provide a 1.1v source? Thanks!

Hi, sorry for the late response. Forum update mail went straight to spam.
I have never used an external Aref myself so cannot help on that. I was trying to update the readVcc function used with R3 using the internal 1.1V ref to R4.
I do not know how/where you have defined/tried to define your intVREF1 variable, but in my case, intVREF is a global float that holds my fixed/accurate value for the 1.1 internal ref voltage (+stored in device EEPROM) when I am using an R3 and another correction factor around 1 if using an R4. So for the function to work, you will have to define this variable yourself outside the scope of this function.

1 Like