Loading...
Pages: [1]   Go Down
Author Topic: LedControl library problem  (Read 1180 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I get the following errors when compiling

In file included from sketch_apr10a.cpp:1:
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:24:24: error: WConstants.h: No such file or directory
In file included from sketch_apr10a.cpp:1:
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:30: error: 'byte' does not name a type
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:52: error: 'byte' does not name a type
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:54: error: 'byte' does not name a type
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:64: error: 'byte' has not been declared
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:64: error: 'byte' has not been declared
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:131: error: 'boolean' has not been declared
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:142: error: 'byte' has not been declared
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:153: error: 'byte' has not been declared
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:164: error: 'byte' has not been declared
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:164: error: 'boolean' has not been declared
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:179: error: 'boolean' has not been declared

I get a notification that dismisses itself very quickly at startup I can't read.

The code is:

#include <LedControl.h>

void setup(){}

void loop(){}

Anyone know what's going wrong? I could compile successfully until I replaced the files in the library for the exact same files plus the keywords.txt file.
Logged

Northern Ireland
Offline Offline
Newbie
*
Karma: 0
Posts: 45
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I took a quick look at the library, well libraries since there are two LedControl libraries.  The first one compiled straight away but the second modified one gave the errors you mentioned.

Did you update to the Arduino 1.0 IDE?

If you didn't update the IDE are you sure your using the same one as before and not accidently swapped it for the modified one?

If you updated the IDE and are sure its the correct LedControl library try opening LedControl.h and replace #include "WConstants.h" with #include "Arduino.h" and also open LedControl.cpp and replace #include "WProgram.h" with #include "Arduino.h"
« Last Edit: April 10, 2012, 07:06:36 pm by Wazzled » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks! Easy fix, It now works fine.  smiley
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I ran into this same problem after updating from arduino 022 to 1.0.3. I made the suggested change with no joy. Re-downloading the library worked for me.
Logged

Pages: [1]   Go Up
Print
 
Jump to: