Can you make an LED blink just once?

Okay so it's easy to make an LED blink over and over again in a loop.

But what if you just want it to blink once?

Its impossible!!!!!!!!!!!! hence the word "loop"

or maybe put the blink code in setup
or write a statement that is only true once

Its impossible!!!!!!!!!!!! hence the word "loop"

Bzzzzzt! People have posted examples of similar request and an answer is to put all the blink stuff in setup instead of loop. Also, apparently the below will form a loop when inside of a larger loop, preventing further execution of the larger loop.

for(;;);

Also, apparently the below will form a loop when inside of a larger loop, preventing further execution of the larger loop.

How do you get the smiley face in the IDE?

Bzzzzzt!

I was only joking....

an answer is to put all the blink stuff in setup instead of loop

maybe you did not finish reading my comment because that is exactly what i said to do. 8)

apparently the below will form a loop when inside of a larger loop, preventing further execution of the larger loop

ok? no one said anything about a for loop though?

How do you get the smiley face in the IDE?

The smiley face is just an illusion produced by your online multimedia dashboard as it tries to please and amuse you. Lets see if we can trick it.

for(;;);

maybe you did not finish reading my comment because that is exactly what i said to do.

Perhaps I was already typing when you made the edit.

Another simple thing would be a variable and if( statement

Like in the beginning
int firstrun = 1,

Then in loop

If( firstrun == 1){
code to blink;
firstrun = 0;
}

You could also use boolean true and false instead of an int