Typo, configurable delay.
This commit is contained in:
parent
91a24e57c6
commit
50783d8ef8
@ -10,30 +10,31 @@
|
|||||||
#define Debugln(x)
|
#define Debugln(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Define relais pins
|
// Define relay pins
|
||||||
#define relaisPin_1 11
|
#define relayPin_1 11
|
||||||
#define relaisPin_2 12
|
#define relayPin_2 12
|
||||||
|
#define interval 2000
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(9600); // open the serial port at 9600 bps
|
Serial.begin(9600); // open the serial port at 9600 bps
|
||||||
|
|
||||||
// Init pins HIGH
|
// Init pins HIGH
|
||||||
digitalWrite(relaisPin_1, HIGH);
|
digitalWrite(relayPin_1, HIGH);
|
||||||
digitalWrite(relaisPin_2, HIGH);
|
digitalWrite(relayPin_2, HIGH);
|
||||||
pinMode(relaisPin_1, OUTPUT);
|
pinMode(relayPin_1, OUTPUT);
|
||||||
pinMode(relaisPin_2, OUTPUT);
|
pinMode(relayPin_2, OUTPUT);
|
||||||
|
|
||||||
Debugln("Hello!");
|
Debugln("Hello!");
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
delay(2000); // Wait for 2 seconds
|
delay(interval); // Wait for 2 seconds
|
||||||
Debugln("Enable power rail #1");
|
Debugln("Enable power rail #1");
|
||||||
digitalWrite(relaisPin_1, LOW); // Poweron relais #1
|
digitalWrite(relayPin_1, LOW); // Poweron relay #1
|
||||||
|
|
||||||
delay(2000);
|
delay(interval);
|
||||||
Debugln("Enable power rail #2");
|
Debugln("Enable power rail #2");
|
||||||
digitalWrite(relaisPin_2, LOW); // Poweron relais #2
|
digitalWrite(relayPin_2, LOW); // Poweron relay #2
|
||||||
|
|
||||||
delay(50); // wait for UART to finish
|
delay(50); // wait for UART to finish
|
||||||
stop();
|
stop();
|
||||||
|
Loading…
Reference in New Issue
Block a user