Cant get FreqCount to compile on Teensy 4.1

I am new to the Teensy world but have been an Arduino user for many years. I recently downloaded the latest version of the Arduino IDE and the Teensy 1.5.9 add-on.

I was able to load and complie the very basic LED sketch but my next project that I want to work with is FreqCount. I can not get it to successfully complile.

This is the error message that I get:


Multiple libraries were found for "FreqCount.h"
Used: C:\Users\OWNER\Documents\Arduino\libraries\FreqCount
Not used: C:\Users\OWNER\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\FreqCount
Using library FreqCount at version 1.3 in folder: C:\Users\OWNER\Documents\Arduino\libraries\FreqCount
exit status 1

Compilation error: exit status 1

Don
 
Teensy includes its own hardware-specific version of the FreqCount library and you have a conflicting version in your libraries directory.
 
I am not familiar with the second library directory and how it got there. In the past I have always had my libraries in documents/arduino/library
Which library should I be using and should I rename the other one?
 
If you really want FreqCount to be in Documents\Arduino\libraries, just copy the working one from AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\FreqCount. Or get the latest from github and put it in Documents\Arduino\libraries.

Arduino IDE gives top priority to libraries in Documents\Arduino\libraries, usually overriding all others with the same (conflicting) name. That's great if you want to be in control. But it also means you're responsible for having the correct version installed in your Documents\Arduino\libraries folder.

The copy in AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries was put there automatically when you installed the latest Teensy package. It comes with lots of updated libraries, so many things will "just work". Or at least they just work if you haven't put another copy in Documents\Arduino\libraries which isn't compatible.
 
Back
Top