Error Message: Serial not declared

I'm using Arduino IDE 1.0.4 in Linux Ubuntu 32 bit. I can't run any of the serial examples containing serial.print, serial.println, etc. without getting the "serial was not declared in this scope" message. Even the simple script below gets the message.

void setup() { Serial.begin(9600); }

void loop() { serial.print(3); delay(1000); }

I tried adding #include "SoftwareSerial.h" library at the top with no luck. Also tried #include "Arduino.h" Neither of those should be necessary in 1.0.4 if I'm reading correctly.

I have done a lot of searching on Google and this site with no answers. I'm brand new to Arduino; would appreciate some help.


C/C++ is case sensitive, gotta watch that.


Thanks VERY much! My "serial.print" vs the necessary "Serial.print" was the problem. I should have figured that out, but when you are new to a task in the digital domain you are swamped with information and do wind up missing what later seems obvious. My previous coding experience was with case-insensitive languages.

Glad to help. I've done the same myself. I have noticed the IDE is using color more & more to highlight things that are valid syntax, sort of like color notification of a good auto-complete.

Isn't it always the simple things that trip us up? I have (not so) fond memories of trying to correct code errors that turned out to be a missing semicolon about a page up from the error in Pascal...

Yes, have done the same. Even in C++ in the IDE - error declared that turned out to come from misplace ) someplace totally different. It does get better with practice - I can write a lot of stuff now that compiles fine right off the bat. Programming for a new part, reading the spec sheet and figuring out a method to loop thru and octal ADC or DAC or something, that might take a few tries.