My project is IoT based controlling LED by using Arduino Mega and Ethernet shield through Cayenne plateform.
Add Cayenne Library to Arduino IDEThe Cayenne Library is a collection of code, known as sketch files, that makes it easy for you to connect and send data to and from sensors, actuators and devices connected to Arduino boards. Cayenne sketch files can be combined with other sketch files for your IoT projects.
The Cayenne Library is available directly from the Arduino IDE Libraries list. To install the library, select Sketch > Include library > Manage Libraries. The Library Manager dialog will appear. From here, search for the Cayenne library and install it.
In order to successfully program your Arduino board, you will need to verify that the appropriate Board and Port are selected in the Arduino IDE.
First, verify that the correct Board is selected in the Tools > Board menu. Be sure to select the board type that you will be programming.
Copy & paste the sketch file contents into Arduino IDE and select Sketch > Upload to upload the sketch file to your device.
After setting up your PC/Mac computer with the Arduino IDE and the Cayenne Library, you are ready to install Cayenne onto your device. Continue to Step 3 of the Arduino installation, where you will connect your board with Cayenne.
On this screen, select the Arduino board that you are using from the list of supported boards. As you select your Arduino board, a list of connections appears below the board name. Select the connection type that you are using.
Click Add New > Device / Widget.
- Choose Actuator > Light > Luminosity.
- Choose Virtual from the I/O field.
- We will use Virtual Pin 1 for this example. Choose V1 from the Pin field.
- Click the Step 1: Sketch File button to view the sketch file.
Comments