system
December 28, 2013, 4:22pm
1
Hi there. At the moment, I am working on a program, which creates a S.O.S. message with a LED. Below is the program:
int ledPin = 13;
void setup()
{
pinMode(ledPin, OUTPUT);
}
void loop()
{
falsh(200); flash(200); flash(200);
delay(300);
flash(500); flash(500); flash(500);
falsh(200); flash(200); flash(200);
}
void flash(int duration)
{
digitalWrite(ledPin, HIGH);
delay(duration);
digitalWrite(ledPin, LOW);
delay(duration);
}
When I verify the code, it says that flash hasn't been declared in this scope. I don't know what to do when this message appears. Can anyone help me please?
JimboZA
December 28, 2013, 4:28pm
2
Read the error again.... it might say "falsh"
falsh (200); flash(200); flash(200);
system
December 28, 2013, 4:29pm
4
This typo appears twice in your code:
falsh (200); flash(200); flash(200);
JimboZA
December 28, 2013, 4:31pm
5
@RoyK , you can't do any highlighting inside the code tags...
system
December 28, 2013, 4:39pm
6
@RoyK , you can't do any highlighting inside the code tags...
Yeah, just figured that out. Live and learn XD
JimboZA
December 28, 2013, 4:42pm
7
They say it's a sad day when we don't learn some thing...
system
January 4, 2014, 6:58pm
8
Thank you everyone. This was my first ever project. Thanks XD