I had a program, LED to blink for 1 minute and then display hello world.
how do i exit Void Loop ???
code is here
int outPin = 8; // digital pin 8 #include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
pinMode(outPin, OUTPUT); // sets the digital pin as output
}
void loop() {
digitalWrite(outPin, HIGH); // sets the pin on
delay(1000); // pauses for 1 second
digitalWrite(outPin, LOW); // sets the pin off
delay(1000); // pauses for 1 second
}
You exit the loop() function every time the program counter reaches the closing bracket at the end of the function. Then loop() is called again, repeat over and over. So I think what you're really asking is how you can stop loop() from running. You can do this by executing an endless while() loop: