1
www.bluesail.co.in
info@bluesail.co.in
2
Digital Reading /
Writing
Relay Module
3
What is a Relay Module?
A relay is basically another type of switch which is operated by an electromagnet. The
electromagnet requires a small voltage to get activated which we will give from the Arduino
and once it is activated, it will pull the contact to make the circuit.
We normally use relay as a switch to control high voltage circuit.
4
Relay Working
5
Relay Pin Description
6
Relay Connection with Arduino
7
Code
#define relay 7
void setup() {
pinMode(relay, OUTPUT);
}
void loop() {
digitalWrite(relay, LOW);
delay(1000);
digitalWrite(relay, HIGH);
delay(1000);
}
8
www.bluesail.co.in
info@bluesail.co.in