analogReference()
Abstract
The analogReferece() sets the reference voltage for analog input. It just sets a global variable.
Source Code
The analogReference() is defined in hardware/arduino/avr/cores/arduino/wiring_analog.c as below.
|
|
The input is mode and its type is uint8_t. The mode can be one of ‘DEFAULT’, ‘INTERNAL’ or ‘EXTERNAL’.
This function stores the mode into the global variable named analog_reference. The analog_reference is used in analogRead().
Version
Arduino AVR Boards 1.8.6
Last Update
March 21, 2023