1 Overview

In this lesson, we’ll learn how remote control a relay switch.

2 Hardware Preparation

Quantity
UNO R3 board 1
W5500 Ethernet shield 1
USB cable 1
Relay 1
Jumper wires several
Breadboard 1

3 Hardware connection

Connect the W5500 ethernet shield with Uno as following diagram:

UNO R3 W5500
5V 5v
GND GND
D10 SCS
D11 MOSI
D12 MISO
D13 SCLK

Connect the relay with UNO as following diagram:

4 Add new Device

Log in Cayenne IOT platform, Add new…->Device/Widget

Choose:Actuators->Relay

Click Relay Switch, and set the datasheet as followed:

In you dashboard, click”Step 1:Sketch File”, the sample sketch will be displayed,copy and paste the sketch into Arduino IDE, please remember to change the code to match your connection type, as we use W5500, we need to change the #include code as “CayenneEthernetW5500.h”   as shown below:

Choose the Board type Arduino Uno and corret Port, remember to use your authentication token. upload the sketch to Uno board, in your Cayenne dashboad click”Setp 2 :Add Actuators” then you should see the Relay Switch was added on your dashboad:

Now you can remote control the replay switch by clicking the button on your smart phone or web browser. further more you can creat more DIY IOT Project, for example use it to control the LED.

Leave a Reply

WordPress spam blocked by CleanTalk.
Bombax Theme designed by itx