25 lines
457 B
Arduino
25 lines
457 B
Arduino
|
#define RELAY1_PIN 11
|
||
|
#define RELAY2_PIN 7
|
||
|
|
||
|
void setup() {
|
||
|
// initialize serial communications at 9600 bps:
|
||
|
Serial.begin(9600);
|
||
|
|
||
|
pinMode(RELAY1_PIN, OUTPUT);
|
||
|
pinMode(RELAY2_PIN, OUTPUT);
|
||
|
|
||
|
digitalWrite(RELAY1_PIN, LOW);
|
||
|
digitalWrite(RELAY2_PIN, LOW);
|
||
|
}
|
||
|
|
||
|
void loop() {
|
||
|
digitalWrite(RELAY1_PIN, HIGH);
|
||
|
delay(500);
|
||
|
digitalWrite(RELAY2_PIN, HIGH);
|
||
|
delay(500);
|
||
|
digitalWrite(RELAY1_PIN, LOW);
|
||
|
delay(500);
|
||
|
digitalWrite(RELAY2_PIN, LOW);
|
||
|
delay(500);
|
||
|
}
|