SBUS
SBUS copied to clipboard
Will not compile for Arduino Leonardo
It seems this library is currently incompatible with the ATmega32u4 from the Arduino Leonardo (built into a DFrobot Romeo in my case). Could this library be made compatible? This SBUS library would be great on this robot controller! Thank you.
Here is my Arduino IDE 1.6.4 error messages:
...\arduino-1.6.4\libraries\SBUS\SBUS.cpp: In member function 'void SBUS::begin(bool)': ...arduino-1.6.4\libraries\SBUS\SBUS.cpp:11:3: error: 'TCCR2A' was not declared in this scope TCCR2A = 0; ^ ...\arduino-1.6.4\libraries\SBUS\SBUS.cpp:12:3: error: 'TCCR2B' was not declared in this scope TCCR2B = 0; ^ ...\arduino-1.6.4\libraries\SBUS\SBUS.cpp:13:3: error: 'TCNT2' was not declared in this scope TCNT2 = 0; ^ ...\arduino-1.6.4\libraries\SBUS\SBUS.cpp:14:3: error: 'OCR2A' was not declared in this scope OCR2A = 249; ^ ...\arduino-1.6.4\libraries\SBUS\SBUS.cpp:15:19: error: 'WGM21' was not declared in this scope TCCR2A |= (1 << WGM21); ^ ...\arduino-1.6.4\libraries\SBUS\SBUS.cpp:16:19: error: 'CS22' was not declared in this scope TCCR2B |= (1 << CS22); ^ Error compiling.
Let me look into this a bit. The 32u4 probably uses different register names than the 328 I tested it on.
Awesome, hopefully it's something relatively simple to add in.
Any updates on this issue? I have the same problem.
I had a similar issue with a Pro Micro. This helped a lot: https://github.com/froqstar/SBUSJoystick (Just changed the cpp and it worked!)