38 lines
1 KiB
Plaintext
38 lines
1 KiB
Plaintext
/*
|
|
* Blink
|
|
*
|
|
* The basic Arduino example. Turns on an LED on for one second,
|
|
* then off for one second, and so on... We use pin 13 because,
|
|
* depending on your Arduino board, it has either a built-in LED
|
|
* or a built-in resistor so that you need only an LED.
|
|
*
|
|
* http://www.arduino.cc/en/Tutorial/Blink
|
|
*/
|
|
|
|
int rele1 = 8;
|
|
int rele2 = 9;
|
|
int rele3 = 10;
|
|
|
|
void setup() // run once, when the sketch starts
|
|
{
|
|
pinMode(rele1, OUTPUT); // sets the digital pin as output
|
|
pinMode(rele2, OUTPUT); // sets the digital pin as output
|
|
pinMode(rele3, OUTPUT); // sets the digital pin as output
|
|
}
|
|
|
|
void loop()
|
|
{
|
|
digitalWrite(rele1, HIGH);
|
|
delay(40000);
|
|
digitalWrite(rele2, HIGH);
|
|
delay(15000);
|
|
digitalWrite(rele1, LOW);
|
|
delay(30000);
|
|
digitalWrite(rele1, HIGH);
|
|
digitalWrite(rele3, HIGH);
|
|
delay(15000);
|
|
digitalWrite(rele1, LOW);
|
|
digitalWrite(rele2, LOW);
|
|
digitalWrite(rele3, LOW);
|
|
}
|