In this lesson, we’ll show how to remote monitor the enviroment temperature and pressure value from Cayenne IOT platfrom.
2 Hareware preparation
|Osoyoo UNO Board||1|
|W5500 Ethernet shield||1|
3 Hareware connection
Connect W5500 Ethernet shield with UNO board as followng diagram:
Connect the BMP180 with UNO as following diagram:
4 Add new device
Log in Cayenne IOT platform，Add new…->Device/Widget
The datasheet will be shown as followed:
Change the data:
Widgit Name: Give your actuator a name, the default name is BMP180；
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 and Virtual. in this example we use Virtual;
Temperature Pin: V2;
Pressure Pin: V1;
Choose Widget: choose any one as you like;
Choose Icon: choose any one as you like.
Then Click”Step 1:Sketch File”,the sample sketch will be displayed, copy and paste the sketch into Arduino IDE, please remember to change the sample code as it works for W5100, we use W5500 in this lesson so change the sketch as CayenneEthernetW5500 as shown below. Before uploading the sketch , please make sure you have done the following 2 steps:
2)Change the code: as the sample sketch is used for W5100, we need to change the code to match our connection type. Because we use W5500, here we change the code #included: CayenneEthernet W5500.h as shown below:
Choose the Board type Arduino Uno and corret Port, then upload the sketch to your Uno board. In the Cayenne dashboard, you can click”Setp 2 :Add Sensor”, once finished, the temperature and barometer widgets will be displayed:
From the databoad,we can read the temperatuire is 25.60 Celsius Degrees and the barometer is99725.0Pa. At the same time you can read the data from your Adroid/iOS smart phone no matter where you are.