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

ATMega328 not supported? #1

Open
solidifier opened this issue Aug 27, 2019 · 2 comments
Open

ATMega328 not supported? #1

solidifier opened this issue Aug 27, 2019 · 2 comments

Comments

@solidifier
Copy link

See below for errors I get.

I'm pretty sure that these problems are because I'm trying to use it on an Arduino Nano.
However, I'm not 100% sure as I still get other errors when compiling for Arduino Mega. Does it also require another timer library to be included?

Anyway, it would be nice to have something in the Readme about what board it requires and maybe a complete example with includes.

......

Arduino: 1.8.9 (Mac OS X), Board: "Arduino Nano, ATmega328P (Old Bootloader)"

Build options changed, rebuilding all
sketch/Encoder.cpp: In function 'void setupTimerInterrupt()':
Encoder.cpp:12:3: error: 'TCCR3A' was not declared in this scope
TCCR3A = 0; // set entire TCCR3A register to 0
^
Encoder.cpp:13:3: error: 'TCCR3B' was not declared in this scope
TCCR3B = 0; // same for TCCR3B
^
Encoder.cpp:14:3: error: 'TCNT3' was not declared in this scope
TCNT3 = 0; //initialize counter value to 0
^
Encoder.cpp:17:3: error: 'OCR3AH' was not declared in this scope
OCR3AH = 0;
^
Encoder.cpp:23:3: error: 'OCR3AL' was not declared in this scope
OCR3AL = INTERRUPT_PERIOD;
^
Encoder.cpp:26:3: error: 'TIMSK3' was not declared in this scope
TIMSK3 = (1 << OCIE3A);
^
Encoder.cpp:26:18: error: 'OCIE3A' was not declared in this scope
TIMSK3 = (1 << OCIE3A);
^
Encoder.cpp:29:19: error: 'WGM32' was not declared in this scope
TCCR3B |= (1 << WGM32);
^
Encoder.cpp:32:19: error: 'CS30' was not declared in this scope
TCCR3B |= (1 << CS30) | (1 << CS31);
^
Encoder.cpp:32:33: error: 'CS31' was not declared in this scope
TCCR3B |= (1 << CS30) | (1 << CS31);
^
exit status 1
'TCCR3A' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

@chrismolloy
Copy link

did you resolve this? I have same issue with nano

@John-Lluch
Copy link
Owner

Please can you test if this works now. I just have added support for ATmega328P, using timer 2

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