ADC library issue: can't find member named setReference

Status
Not open for further replies.

KG5NII

Member
Arduino: 1.8.12
Teensyduino: 1.51
Teensy 3.2
OS: Linux

Updating both Arduino and Teensyduino, now my teensy 3.2 code no longer compiles,
Specifically: error: 'class ADC' has no member named 'setReference'
Of course it can't compile. The method no longer exists. At least not in the ADC class.

Why has setReference() method been taken out of the ADC class?

The next (and most important) question now is how do I set the reference to either

ADC_REFERENCE::REF_1V2 or ADC_REFERENCE::REF_3V3 ?


TIA and Cheers,
KG5NII
 
There have been several threads recently including: https://forum.pjrc.com/threads/5987...on-compile-1-48-does-not-ADC-class-implicated

about the changes to the interface that was made to the library which removed most of the top level interface methods and moved them to submodules calls
So instead of ADC.setReference(...)
you have either ADC->adc0->setReference(...) or ADC0>adc1->setReference depending on which ADC you are wanting to set.

The owner of the library does have at least one Issue raised on this: https://github.com/pedvide/ADC/issues/51
 
There have been several threads recently including: https://forum.pjrc.com/threads/5987...on-compile-1-48-does-not-ADC-class-implicated

about the changes to the interface that was made to the library which removed most of the top level interface methods and moved them to submodules calls
So instead of ADC.setReference(...)
you have either ADC->adc0->setReference(...) or ADC0>adc1->setReference depending on which ADC you are wanting to set.

KurtE, yep, that did the trick alright and as usual your help got me up and running.
I appreciate you taking the time to answer my issue. Thank you!!

Cheers,
KG5NII
 
Status
Not open for further replies.
Back
Top