ADC not working with Teensyduino 4.0
When I try to include ADC.h and compile with Teensyduino 4.0, I get the following errors below: If I compile with Teensyduino 3.6, there are no errors generated. I am running Teensyduino verion 1.53, the newest version, and I have ADC verion 8.0.0 installed.. I am running the Arduino IDE on a Linux machine, IDE verion 1.8.5
/home/rj/Downloads/arduino-1.8.5/hardware/teensy/avr/libraries/ADC/RingBufferDMA.cpp: In constructor 'RingBufferDMA::RingBufferDMA(volatile int16_t*, uint32_t, uint8_t)': /home/rj/Downloads/arduino-1.8.5/hardware/teensy/avr/libraries/ADC/RingBufferDMA.cpp:33:19: error: 'ADC0_RA' was not declared in this scope , ADC_RA(&ADC0_RA + (uint32_t)0x20000ADC_number) ^ /home/rj/Downloads/arduino-1.8.5/hardware/teensy/avr/libraries/ADC/RingBufferDMA.cpp: In member function 'void RingBufferDMA::start(void ()())': /home/rj/Downloads/arduino-1.8.5/hardware/teensy/avr/libraries/ADC/RingBufferDMA.cpp:64:30: error: 'DMAMUX_SOURCE_ADC0' was not declared in this scope uint8_t DMAMUX_SOURCE_ADC = DMAMUX_SOURCE_ADC0; ^ Multiple libraries were found for "ADC.h" Used: /home/rj/Downloads/arduino-1.8.5/hardware/teensy/avr/libraries/ADC Not used: /home/rj/Arduino/libraries/ADC-master Error compiling for board Teensy 4.0.
I think arduino is using an older version of the library, the one you installed with Teensy instead of the one you downloaded. I'm not sure what's the best way to delete the teensy version, maybe through the library manager? or just deleting the folder (/home/rj/Downloads/arduino-1.8.5/hardware/teensy/avr/libraries/ADC/)?