Toggle navigation
Categories
Discussions
Activity
Sign In
Home
›
Hardware
ADC Reference
jgummeson
August 2015
in
Hardware
Quick question: Is there any way to program the ADC reference using the Android SDK? I don't see this mentioned in the documentation.
Thanks.
Comments
jgummeson
August 2015
I think I found the answer to my own question. I believe the following line of code will use the internal 1.2V reference:
gpioModule.routeData().fromAnalogIn((byte) 2, AnalogReadMode.ABS_REFERENCE);
Eric
August 2015
What do you mean by "program the ADC reference" ? If you are trying to read the ADC ratio, then use AnalogReadMode.ADC.
jgummeson
August 2015
edited August 2015
Sorry for the lack of clarity...what I meant is "tell the ADC to use the internal 1.2V reference instead of a ratio of supply voltage." The line of code above appears to accomplish that.
This discussion has been closed.
Comments