I'm a beginner with Arduino Uno.
and I'm studying with a book titled "Programming Arduino Getting Started with Sketches".
Below is the coding I referred.
int ledPin = 13;
int delayPeriod = 250;
void setup()
{
pinMode(ledPin, OUTPUT);
}
void loop()
{
for (int i = 0; i < 20; i ++)
{
flash();
}
delay(3000);
}
void flash()
{
digitalWrite(ledPin, HIGH);
delay(delayPeriod);
digitalWrite(ledPin, LOW);
delay(delayPeriod);
}
It's a simple coding to turn on and off the LED.
I uploaded this coding on my board via IDE 6.1.12 a few days ago.
and now I try again but the system said that 'flash' was not declared.
I didn't change anything of this coding.
but it was operated before but not now.
I don't know why and how to solve this problem.
Even on the book, the author declared all functions on the bottom of the programmings.
I searched on google but there was not accurate answer.
so I'm asking here.
Also I heard that Arduino include prototype declare so I can declare the function in anywhere.
then why doesn't it work now?
I think I didn't touch any settings of board or IDE...
please somebody help me.