Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initializeCPUCycles and FAST error #23

Open
jeffThompson opened this issue Jan 25, 2016 · 3 comments
Open

initializeCPUCycles and FAST error #23

jeffThompson opened this issue Jan 25, 2016 · 3 comments

Comments

@jeffThompson
Copy link

Wonderful project, thank you so much! I get an error trying to compile my sketch, which I believe is from the Mozzi library:

Users/JeffThompson/Documents/Arduino/libraries/Mozzi/MozziGuts.cpp: In function 'void startAudioStandard()':
/Users/JeffThompson/Documents/Arduino/libraries/Mozzi/MozziGuts.cpp:285:9: error: 'class TimerOne' has no member named 'initializeCPUCycles'
  Timer1.initializeCPUCycles(16000000UL/PWM_RATE, FAST); // fast mode enables higher PWM rate
         ^
/Users/JeffThompson/Documents/Arduino/libraries/Mozzi/MozziGuts.cpp:285:50: error: 'FAST' was not declared in this scope
  Timer1.initializeCPUCycles(16000000UL/PWM_RATE, FAST); // fast mode enables higher PWM rate
                                                  ^
exit status 1
Error compiling.

Is this an issue with the library?

@sensorium
Copy link
Owner

Hi Jeff,
what version of Arduino are you using to compile?

Tim

On 26 January 2016 at 02:32, Jeff Thompson notifications@github.com wrote:

Wonderful project, thank you so much! I get an error trying to compile my
sketch, which I believe is from the Mozzi library:

Users/JeffThompson/Documents/Arduino/libraries/Mozzi/MozziGuts.cpp: In function 'void startAudioStandard()':
/Users/JeffThompson/Documents/Arduino/libraries/Mozzi/MozziGuts.cpp:285:9: error: 'class TimerOne' has no member named 'initializeCPUCycles'
Timer1.initializeCPUCycles(16000000UL/PWM_RATE, FAST); // fast mode enables higher PWM rate
^
/Users/JeffThompson/Documents/Arduino/libraries/Mozzi/MozziGuts.cpp:285:50: error: 'FAST' was not declared in this scope
Timer1.initializeCPUCycles(16000000UL/PWM_RATE, FAST); // fast mode enables higher PWM rate
^
exit status 1
Error compiling.

Is this an issue with the library?


Reply to this email directly or view it on GitHub
#23.

@jeffThompson
Copy link
Author

Should have mentioned that! I'm running 1.6.6. Tried compiling for several different boards to see if that was the issue, but they all gave the same error.

@tfry-git
Copy link
Collaborator

This is almost certainly caused by the compiler picking up the TimerOne.h header from a separately installed library rather than Mozzi's version.

Not sure on the best way out of this. TimerOne.cpp already has #include with quotation marks instead of angle brackets, so that won't help. @jeffThompson are you still around? If so, could you try editing Mozzi\utility\TimerOne.cpp, replacing #include "TimerOne.h" with #include "../utility/TimerOne.h"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants