Skip to content

Latest commit

 

History

History
executable file
·
21 lines (17 loc) · 392 Bytes

13_relay-module.md

File metadata and controls

executable file
·
21 lines (17 loc) · 392 Bytes

13. Relay Module

/*  13. Relay module
        https://lastminuteengineers.com/one-channel-relay-module-arduino-tutorial
*/
#define RELAY 6

void setup() {
  pinMode(RELAY, OUTPUT);
}

void loop() {
  digitalWrite(RELAY, LOW);             // activate relay
  delay(1000);
  digitalWrite(RELAY, HIGH);            // deactivate relay
  delay(3000);
}