hi all
i have this sketch but it aal runs as one sketch i would like for it to 3 different sketches in one
i would like led1 to blink constantly led2 to blink more slowly as led 3 but the problem i have is thet led 2 follows led 1 and led 3 follows led2 i would like them to blink seperatly can this be done and how i'm still a noob ?
the idea is for a halloween mouth
led1 blink eyes
led2 mouth open
led3 mouth close
cheers marko
sketch
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led1 = 9;
int led2 = 10;
int led3 = 11;
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led1, HIGH); // turn the LED on (HIGH is the voltage level)
delay(150); // wait for a second
digitalWrite(led1, LOW); // turn the LED off by making the voltage LOW
delay(150); // wait for a second
digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level)
delay(150); // wait for a second
digitalWrite(led2, LOW); // turn the LED off by making the voltage LOW
delay(150);
digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(led3, LOW); // turn the LED off by making the voltage LOW
delay(500);
}