Tarantula3DIYables
Published

Driving A Relay With An Arduino

This is my 4th tutorial on how to drive a RELAY (not a relay module) with an Arduino.

BeginnerProtip1 hour73,352
Driving A Relay With An Arduino

Things used in this project

Story

Read more

Code

Code.ino

Arduino
int Relay  = 2;                 // Digital pin D5

void setup() {
  Serial.begin(9600);
  pinMode(Relay, OUTPUT);       // declare Relay as output
}

void loop() {
  digitalWrite (Relay, HIGH);
  delay(500);
  digitalWrite (Relay, LOW);
  delay(500);
}

Credits

Tarantula3
72 projects • 89 followers
There were 1000+ sperms but I was the fastest one..
DIYables
1 project • 92 followers
I would like to invite you to join and add your projects to DIYables platform https://www.hackster.io/diyables

Comments