I practice programming using Arduino Due.
Writing this code will result in an error" 'serial' was not declare in this scope".
What should I do?
void setup() {
serial.begin(9600);
}
void loop() {
'serial.println("Hello world");
delay(1000);
}
I practice programming using Arduino Due.
Writing this code will result in an error" 'serial' was not declare in this scope".
What should I do?
void setup() {
serial.begin(9600);
}
void loop() {
'serial.println("Hello world");
delay(1000);
}
Don't forget that C++ is case sensitive. Try Serial instead.
These are commonly used Serial object related methods of Arduino Platform (taken from Arduino Reference Manual):
Serial.available()
Serial.begin()
Serial.end()
Serial.parseFloat()
Serial.parseInt()
Serial.print()
Serial.println()
Serial.read()
Serial.readBytes()
Serial.readBytesUntil()
Serial.readString()
Serial.write()
Another typo was that you left the ‘d’ off the word ‘declared’
C is unforgiving, but will let you know when you screw up!
Thank you!