wayoda / LedControl

An Arduino library for MAX7219 and MAX7221 Led display drivers
Other
465 stars 246 forks source link

Doesnt work with esp8266 based boards #10

Open richms opened 8 years ago

richms commented 8 years ago

In file included from C:\Users\richard\Documents\Arduino\libraries\LedControl\src\LedControl.cpp:28:0: C:\Users\richard\Documents\Arduino\libraries\LedControl\src\LedControl.h:30:26: fatal error: avr/pgmspace.h: No such file or directory

include <avr/pgmspace.h>

                      ^

compilation terminated. Error compiling.

sej7278 commented 8 years ago

remove this line from LedControl.h, then it works great (obviously its not an AVR chip):

#include <avr/pgmspace.h>

https://github.com/wayoda/LedControl/blob/master/src/LedControl.h#L30

pcvm commented 8 years ago

To save everyone looking this up, would it possible for this very useful library to have the following context diff applied? Thanks.

LedControl_context_diff.txt

sej7278 commented 8 years ago

actually this is the proper fix, as it still lets pgmspace work with the esp8266 for 7-segment displays (its not needed for led matrices):

https://github.com/sej7278/LedControl/commit/d82d522791b805ebaebe926c45ca18a1ba35a3cc

MStylesMS commented 8 years ago

Using this for a 7-segment display this worked fine. Thanks!

1n5aN1aC commented 8 years ago

I second this! @sej7278 fix worked great!

ianbren commented 7 years ago

if (defined(AVR))

include <avr\pgmspace.h>

else

include

endif

apacholik commented 6 years ago

@wayoda don't You have time to repair this ? :( This is great https://github.com/wayoda/LedControl/issues/10#issuecomment-290219444