wayoda / LedControl

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

Ledcontrol and w5100 unit not working together #20

Open eriksson25 opened 8 years ago

eriksson25 commented 8 years ago

Trying to compile a project with following liberys

`#include

include

include

include

include

include `

Gives the following error `In file included from D:\Dropbox\KG\Personligt\Arduino\libraries\icmp_ping/ICMPPing.h:12:0, from Bastucontroller.ino:4: C:\Program Files (x86)\arduino-1.6.5-r2\libraries\Ethernet\src/utility/w5100.h:15:16: error: expected unqualified-id before numeric constant

define SPI_CS 10

            ^

D:\Dropbox\KG\Personligt\Arduino\libraries\LedControl\src/LedControl.h:75:13: note: in expansion of macro 'SPI_CS' int SPI_CS; ^ Error compiling.`

Only thing that works is to comment out ledcontroll, then it compiles.

wayoda commented 8 years ago

I think you have to update your arduino version:

C:\Program Files (x86)\arduino-1.6.5-r2\libraries\Ethernet\src/utility/w5100.h:15:16: error: expected unqualified-id before numeric constant #define SPI_CS 10

In version 1.6.7 of the Arduino IDE line 15 of the file libraries\Ethernet\src/utility/w5100.h reads : #define ETHERNET_SHIELD_SPI_CS 10

So with this more recent version there is no conflict between the #define in ws5100 and the private variable in the LedControl-code.