pololu/pololu-led-strip-arduino

Compilation fails when address pins > 41 on Arduino Mega 2560 R3

Closed this issue · 1 comments

When put something like this in code:

PololuLedStrip<42> ledStrip1;

I get the following compilation error:

In file included from a_Headers.ino:19:0:
~/Documents/Arduino/libraries/PololuLedStrip/PololuLedStrip.h: In member function 'void Pololu::PololuLedStrip<pin>::write(Pololu::rgb_color*, unsigned int) [with unsigned char pin = 42u; Pololu::rgb_color = Pololu::rgb_color]':
~/Documents/Arduino/libraries/PololuLedStrip/PololuLedStrip.h:305:8: error: impossible constraint in 'asm'
       );
        ^

Hello. This limitation is documented in the README, which says:

For ATmega2560-based boards such as the Arduino Mega, only the following pins are usable: 0–5, 10–13, 18–41, and 50–61 (ports A through G).