LedControl icon indicating copy to clipboard operation
LedControl copied to clipboard

Ledcontrol and w5100 unit not working together

Open eriksson25 opened this issue 8 years ago • 1 comments

Trying to compile a project with following liberys

`#include <SPI.h>

include <Ethernet.h>

include <ICMPPing.h>

include <OneWire.h>

include <DallasTemperature.h>

include <LedControl.h> `

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.

eriksson25 avatar Oct 16 '16 19:10 eriksson25

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.

wayoda avatar Oct 17 '16 13:10 wayoda