docs

a slatepencil documentail site

View on GitHub

Realy Module

hardware

wire

code

/**
    you may hear ticktock. That's the normally closed contact opened and the normally open contact closed.
 */

const int relayPin = 7; // the "s" of relay module attach to

void setup() {
  // put your setup code here, to run once:
  pinMode(relayPin, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(relayPin, HIGH); // Close the relay
  delay(1000);
  digitalWrite(relayPin, LOW); // disconnect the relay;
  delay(1000);
}