Authorized Online Retailers:
In this lesson, we’ll learn how to use Arduino turn on/off a LED through Cayenne IOT platform. the parts needed for this lesson as followed:
|Ethernet Shield W5100||1|
|200 ohm resistor||1|
We need to connect the W5100 shield with the Osoyoo UNO board,then connect the led to D4 as below:
3)Action on Cayenne control panel
Login Cayenne platform and add new device
Select”Add new…”-> Click Device/Widget”
Click: Actuators–>Light，choose Light Switch
all the attributes could be changed:
Give your actuator a name
Select your Arduino device, this lesson we using UNO, so choose Arduino UNO.
Select your method of connectivity:There are Digital pins, Analog Pins and Cayenne Virtual Pin
If you’re reading data from an analog sensor, the Arduino may have several analog inputs that can be used. Simply connect your analog sensor to one of the analog pins on the Arduino. Make sure you select the correct corresponding pin when adding a widget for your analog sensor.
A digital pin can be used to read data from a non-analog sensor, but the data will need to be written to a virtual channel. If you’re trying to read data from a non-analog sensor, you’ll most likely use a virtual pin.
Virtual pins are channels to send and receive different data types from and to the Arduino (e.g. SPI, I2C, 1-Wire and devices connected to Arduino expansion boards). There are 26 virtual pins available for each Arduino board.
For more information about Analog or Virtual pins, please visit:https://mydevices.com/cayenne/docs/#sketch-files-using-analog-vs-virtual-pins
This lesson we select Digital Pins D4
Choose Wiget: Button
Then Click “Step 1: Sketh file”
Choose the Board type Arduino Uno and corret Port, copy and paste the sketch file into your Arduino IDE.
Remember to use your authentication token. In the Cayenne dashboard, you can click “Step 2: Add Actuator”
Then the LED widget will be added to your dashboard. You can turn on/off by clicking on the icon at the right of the LED widget.
At the same time, you can remote to control the LED from your smart phone.
APP is updating. It can only display data and status. It cannot be operated in real time.
DownLoad Url osoyoo.com