Problem compiling for PWM library

I just installed PWM library, but I get errors when trying to compile PWM_lib_example.ino:

/Users/kevin/Documents/Arduino/libraries/PWM/examples/PWM_lib_example/PWM_lib_example.ino:24: undefined reference to `InitTimersSafe()'
/Users/kevin/Documents/Arduino/libraries/PWM/examples/PWM_lib_example/PWM_lib_example.ino:27: undefined reference to `SetPinFrequencySafe(signed char, unsigned long)'
/var/folders/xg/k651jnd11fsc5hljfrqcpfrc0000gn/T//cckpCPI7.ltrans0.ltrans.o: In function `loop':
/Users/kevin/Documents/Arduino/libraries/PWM/examples/PWM_lib_example/PWM_lib_example.ino:39: undefined reference to `pwmWrite(unsigned char, unsigned char)'

According to post #2 in this thread:

I have the file structure set up correctly.

Any suggestions?

Do not compile examples in place, in the libraries directory. First copy the example folder (i.e PWM_lib_example) to your sketchbook dir and than build it.

That did not work. It kinda doesn't make sense anyway as I have been able to run all of my other examples from their respective folders.

Not if the Arduino IDE can't find the files.

What arduino board are you using?

And Just a suggestion...the last version of the library dated 2012, the Arduino IDE has changed a lot since then.
Can you show the path to the dir where the file PWM.h is located?

nano every

from the source of the library:

/*
This library is built to support two of the AVR Architecture 'groups' that Arduino uses
a) ATmega48/88/168/328,
b) ATmega640/1280/1281/2560/2561
*/

If you do not know, nano every is not included to this list

Aaaahhh, thank you. Problem solved.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.