Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: ADC library issue: can't find member named setReference

  1. #1
    Junior Member KG5NII's Avatar
    Join Date
    Aug 2019
    Location
    Texas
    Posts
    16

    ADC library issue: can't find member named setReference

    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

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    6,357
    There have been several threads recently including: https://forum.pjrc.com/threads/59874...ass-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

  3. #3
    Junior Member KG5NII's Avatar
    Join Date
    Aug 2019
    Location
    Texas
    Posts
    16
    Quote Originally Posted by KurtE View Post
    There have been several threads recently including: https://forum.pjrc.com/threads/59874...ass-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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •