analogReference()

Set reference voltages for ADC used in analogRead(). analogReference(referenceMask) referenceMask ORed mask of values from the table below None

Value to be ORedUpper voltage referenceVoltage reference
ADC_HIGH_EXTERNALA0 pin as upper reference voltageVoltage on A0 pin
ADC_HIGH_INTERNALInternal voltage reference 1.2 V as upper reference voltage (NB! there might be a ±10% drift from Z-Uno to Z-Uno, but constant for a particular Z-Uno!)1.2 V
ADC_HIGH_VCCVcc as upper reference voltageVoltage on Vcc pin
Value to be ORedLower voltage referenceVoltage reference
ADC_LOW_EXTERNALA1 pin as lower reference voltageVoltage on A1 pin
ADC_LOW_GNDGND as lower reference voltageVoltage on GND pin
ValuePre-defined (Arduino-like) combinationsVoltage reference
DEFAULT (default)GND–Vcc(ADC_HIGH_VCC | ADC_LOW_GND)
INTERNALGND–1.2V(ADC_HIGH_INTERNAL | ADC_LOW_GND)
EXTERNALGND–A0(ADC_HIGH_EXTERNAL | ADC_LOW_GND)