Teensy 4 not supported by ADC examples

Status
Not open for further replies.
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.
 
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.
 
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?
Thanks.
 
"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."

so exactly where? I am using Mac and always have problems finding any referenced Arduino files.
 
To look inside applications on MacOS using the finder try right-click "show package contents" to see the internals.

Then its Contents/Java/hardware/......
 
You can also find the docs of the latest ADC version at http://pedvide.github.io/ADC/.

Regarding your original message:
Code:
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?).
 
Status
Not open for further replies.
Back
Top