In file included from Serial.cpp:2:
C:\Users\User\Documents\Arduino\libraries\L3G4200D/L3G4200D.h:4:43: error: Arduino.h: No such file or directory
In file included from Serial.cpp:2:
C:\Users\User\Documents\Arduino\libraries\L3G4200D/L3G4200D.h:51: error: 'byte' has not been declared
C:\Users\User\Documents\Arduino\libraries\L3G4200D/L3G4200D.h:51: error: 'byte' has not been declared
C:\Users\User\Documents\Arduino\libraries\L3G4200D/L3G4200D.h:52: error: 'byte' does not name a type
I'm stuck I don't have experience using libraries with Arduino so I guess it's something to do with it. Any comments and suggestions will be much appreciated, thanks.
You're right! I'm using the 0022 version, I also have the new version though (1.0) and I get this error
In file included from sketch_feb10a.cpp:2:
C:\Users\User\Documents\Arduino\libraries\L3G4200D/L3G4200D.h:4:43: error: Arduino.h: No such file or directory
In file included from sketch_feb10a.cpp:2:
C:\Users\User\Documents\Arduino\libraries\L3G4200D/L3G4200D.h:51: error: 'byte' has not been declared
C:\Users\User\Documents\Arduino\libraries\L3G4200D/L3G4200D.h:51: error: 'byte' has not been declared
C:\Users\User\Documents\Arduino\libraries\L3G4200D/L3G4200D.h:52: error: 'byte' does not name a type
sketch_feb10a.cpp: In function 'void setup()':
sketch_feb10a:6: error: 'Serial' was not declared in this scope
sketch_feb10a.cpp: In function 'void loop()':
sketch_feb10a:14: error: 'Serial' was not declared in this scope
sketch_feb10a:22: error: 'delay' was not declared in this scope
Paul, I think you misunderstood what I wrote, or maybe I wasn't clear
I've been using 0022 version for like a year (maybe less), but now I have a gyro and I can't get it to work with the 0022 version, the code I'm trying to run is this
In file included from Serial.cpp:2:
C:\Users\User\Documents\Arduino\libraries\L3G4200D/L3G4200D.h:4:43: error: Arduino.h: No such file or directory
In file included from Serial.cpp:2:
C:\Users\User\Documents\Arduino\libraries\L3G4200D/L3G4200D.h:51: error: 'byte' has not been declared
C:\Users\User\Documents\Arduino\libraries\L3G4200D/L3G4200D.h:51: error: 'byte' has not been declared
C:\Users\User\Documents\Arduino\libraries\L3G4200D/L3G4200D.h:52: error: 'byte' does not name a type
I learned there was a new version, 1.0, so I installed it but when I run the same code I get the same error + some extra lines,
In file included from sketch_feb10a.cpp:2:
C:\Users\User\Documents\Arduino\libraries\L3G4200D/L3G4200D.h:4:43: error: Arduino.h: No such file or directory
In file included from sketch_feb10a.cpp:2:
C:\Users\User\Documents\Arduino\libraries\L3G4200D/L3G4200D.h:51: error: 'byte' has not been declared
C:\Users\User\Documents\Arduino\libraries\L3G4200D/L3G4200D.h:51: error: 'byte' has not been declared
C:\Users\User\Documents\Arduino\libraries\L3G4200D/L3G4200D.h:52: error: 'byte' does not name a type
sketch_feb10a.cpp: In function 'void setup()':
sketch_feb10a:6: error: 'Serial' was not declared in this scope
sketch_feb10a.cpp: In function 'void loop()':
sketch_feb10a:14: error: 'Serial' was not declared in this scope
sketch_feb10a:22: error: 'delay' was not declared in this scope
There's a library I'm using to run the gyro (L3G4200D). In the Arduino "libraries" directory I copied and pasted the corresponding folder with its files. However, I'm stuck, with both IDEs I get the same.
I obviously don't know much about Arduino libraries, only the basics. That's basically why I'm asking for help
In the Arduino "libraries" directory I copied and pasted the corresponding folder with its files.
In which Arduino libraries directory? If you have two versions of the IDE, you have 3 possible libraries folders. Only one of them is the right place for downloaded libraries.
Where DID you download the library from?
The Arduino.h file IS part of Arduino 1.0. If you are running the 1.0 version of the IDE, save the sketch. Look at the folder you saved the sketch in. The file should have the .ino extension. If it doesn't, you aren't running the 1.0 version, which explains the error messages.
In which Arduino libraries directory? If you have two versions of the IDE, you have 3 possible libraries folders. Only one of them is the right place for downloaded libraries.
First I copied and pasted it in the 0022 libraries directory, as it didn't work I installed the 1.0 and did the same, I copied and pasted it in the libraries directory of the new IDE, same problem.
Why do you say there are 3 possible libraries folders? and not two?
Where DID you download the library from?
The Arduino.h file IS part of Arduino 1.0. If you are running the 1.0 version of the IDE, save the sketch. Look at the folder you saved the sketch in. The file should have the .ino extension. If it doesn't, you aren't running the 1.0 version, which explains the error messages.
Why do you say there are 3 possible libraries folders? and not two?
Official libraries go in the libraries folder under installPath\Arduino-0022 or installPath\Arduino-1.0.
User downloaded libraries go in the libraries folder (created, if needed) in the user's sketchbook location.
I downloaded the library, and unzipped it. I opened the sketch example, named serial.pde, using 0022 and tried to compile it. I got the same errors you got.
Then, I opened the same sketch in 1.0, and got this error when compiling:
Binary sketch size: 5264 bytes (of a 30720 byte maximum)
I guess the problem was that I can't have two Arduino IDEs on the computer ? I was running the code in the 1.0 but I would always get that (extended) error. The problem got solved when I deleted the 0022 and restarted the computer. Never thought that'd be the problem.