Nano33 IOT and analogReference()

When I attempt to insert "analogReference(EXTERNAL)" into my Nano33 IOTcode, I get an error message

"invalid conversion from 'int' to 'eAnalogReference {aka _eAnalogReference}' [-fpermissive]."

So I am using the analogRead() function, I suppose, based on the internal 3.3 v. reference, but I really can't find any explanation for this quirk. Does anybody know what is wrong with analogReference() for the 33?

Thanks in advance for any assistance.

jrdoner

The wiring_analog.h file suggest these are the options you have

typedef enum _eAnalogReference
{
AR_DEFAULT,
AR_INTERNAL,
AR_EXTERNAL,
AR_INTERNAL1V0,
AR_INTERNAL1V65,
AR_INTERNAL2V23
} eAnalogReference ;

You can find the file in

C:\Users[username]\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.5\cores\arduino

So, AR_EXTERNAL should work.

A more user friendly, though perhaps less definitive, source of this information is the analogReference() documentation:
https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/