Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 31 of 31

Thread: Teensy 4 not supported by ADC examples

  1. #26
    I have been trying to understand what is going on in this conversionSpeed example but there are instructions in this code that are not in the Arduino code reference. Is there a link someone can please post that describes these codes (they must be specific to the Teensy I guess).
    For example:
    for (auto conv_speed : conversion_speed_list ) { What is going on here? What is "auto"? What is the ":" for?
    Thanks. Teensy 4.0 is totally new to me.

  2. #27
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Check out this file on your system :: "...YOUR arduino..."\hardware\teensy\avr\libraries\ADC\index.html

    Open in browser and there is documentation that should hold answers.

  3. #28
    Thanks, there is some info on the ADC software there but nothing basic that tells me what "AUTO' is or what "-->" means or how the interupt system works in the T4.

    Anyway, I am stripping out all the multiple iterations from the conversionSpeed file in the examples for ADC and having a problem with this compiling this line:
    adc --> adc0 --> enableInterrupts(adc0_isr); I did not touch this line but the compiler says "adc0_isr was not declared in this scope."
    I searched the original file for "isr" and it is not declared in that either, yet the original compiles OK. What is isr and why won't mine compile?
    What is the declaration that it is looking for?

  4. #29
    Senior Member
    Join Date
    Mar 2015
    "Check out this file on your system :: "...YOUR arduino..."\hardware\teensy\avr\libraries\ADC\inde x.html

    Open in browser and there is documentation that should hold answers."

    so exactly where? I am using Mac and always have problems finding any referenced Arduino files.

  5. #30
    Senior Member
    Join Date
    Jul 2020
    To look inside applications on MacOS using the finder try right-click "show package contents" to see the internals.

    Then its Contents/Java/hardware/......

  6. #31
    Senior Member+
    Join Date
    Jul 2013
    You can also find the docs of the latest ADC version at

    Regarding your original message:
    for (auto conv_speed : conversion_speed_list )
    is a C++ construct, it has nothing to do with Arduino or Teensy. Look up any modern C++ reference (I think they may be called ranged for iteration or something similar?).

Posting Permissions

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