Relay Control LED

Introduction

This demo will show you how to use Relay. Actually, Relay is an electronic switch that can be controled by an IO.

Relay is mainly used for weak power control strong power. For example, use your Arduino to control a lamp, you need a Realy. Here we’ll use relay to control a LED.

Hardware Required:

  • Arduino

  • Relay

  • LED

  • 220ohm resistor

Circuit:

Connect Relay to D2 of Arduino.

Code:

Open Arduino IDE, click File -> Sketchbook -> relay_led.

Upload the code, you can find the led blink.

Help us make it better

Welcome to the new documentation system of Seeed Studio. We have made a lot of progress comparing to the old wiki system and will continue to improve it to make it more user friendly and helpful. The improvement can't be done without your kindly feedback. If you have any suggestions or findings, you are most welcome to submit the amended version as our contributor via Github or give us suggestions in the survey below, it would be more appreciated if you could leave your email so that we can reply to you. Happy Hacking!