Authorized Online Retailers:
1 Overview In this lesson, we’ll show how to automatically send a Photoresistor Sensor data to your Cayenne Dashboard. 2 Hareware preparation Parts needed for this lesson as below:
Arduino UNO 1
Ethernet shield W5100 1
USB cable 1
Photoresistor sensor Module 1
Jumper wires several
Bread board 1
3 Hareware connection Connect your Photoresistor with Uno as following diagram A couple of notes before you get started: 4 Add new device Login Cayenne platform,Click Add new…->Device/Widget Choose Sensors->Luminosity Click “Photoresistor” The datasheet will be shown as followed: Setting the data: Widgit Name: Give your actuator a name, the default name is Photoresistor Select Device: Select your Arduino device, the one used in this example is the Arduino Uno Connectivity:Select your method of connectivity:  There are Digital、Analog、Virtual, in this example we use Analog; Pin:  The Arduino may have several pins that can be used as Analog inputs (e.g. Arduino Uno has A0, A1, A2, A3, A4 & A5).  we use A0 in this example Choose Widget:  Widgets are used to control a device or are used to show the visualization of data coming from a device. Cayenne has a growing list of custom widgets available for IoT projects. Each widget has its own settings and configuration options. Choose Icon: Select an Icon to be used for the widget. For example, a temperature sensor could a thermometer Icon. Then click “Step 1:Sketch File”, the sample sketch will be displayed, copy and paste the sketch into Arduino IDE. Choose the Board type Arduino Uno and correct Port, remember to use your authentication token.  upload the sketch to your Uno board. In the Cayenne dashboard, you can click “Step 2: Add Actuator” Then the Photoresistor widget will be displayed on your dashboard. As you can see the luminosity valus is 280 from the datasheet, at the same time you can also read the data from your mobile.