I'm having to move my application from the teensy 3.2 to 4.0. I'm getting this error when I use either INTERNAL or DEFAULT in the analogReference statement on the teensy 4.0,
Arduino\ADC_test_teensy_4.0\ADC_test_teensy_4.0.ino:6:19: error: 'INTERNAL' was not declared in this scope analogReference(INTERNAL); This is a simple application to read a battery voltage, scaled to stay below 3.3V.
What do I need to change to get this to compile on a teensy 4.0?
Arduino\ADC_test_teensy_4.0\ADC_test_teensy_4.0.ino:6:19: error: 'INTERNAL' was not declared in this scope analogReference(INTERNAL); This is a simple application to read a battery voltage, scaled to stay below 3.3V.
What do I need to change to get this to compile on a teensy 4.0?
Code:
/*******************************************************************************
setup for low voltage detection
********************************************************************************/
analogReference(INTERNAL);
analogReadResolution(12);
analogReadAveraging(32);
}
void loop() {
}