You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/arduino-cloud/11.application-notes/cloud-environmental-data/cloud-environmental-data.md
+21-75
Original file line number
Diff line number
Diff line change
@@ -35,91 +35,37 @@ The goals of this project are:
35
35
36
36
## Circuit
37
37
38
-

38
+

39
39
40
40
## Configuring the Cloud
41
41
42
-
The first step in this tutorial is to navigate to the [Arduino Cloud](https://app.arduino.cc/). If you are not logged in, or do not have an account, you will be re-directed to the login page. Here you can create a new account or log in to an existing one.
42
+
***This tutorial assumes you know the basics of the Arduino Cloud. If you are new check out our [Getting Started Guide](/arduino-cloud/guides/overview).***
43
43
44
-
### Configure a new device
44
+
- Create a **Thing** with the following variables:
45
45
46
-
Once we are in the Arduino Cloud, we will need to click on the **"Devices"** tab. This will open a new page which will ask you to add a new device. Click on the **"Add device"** button.
47
-
48
-

49
-
50
-
You will now have an option of either configuring a new Arduino device, or a third party device. Select the **"Set up an Arduino device** option.
51
-
52
-

53
-
54
-
At this point, you will need to connect your cloud compatible board to your computer. You will also need to have installed the Create plugin. If if it is not installed, the set up wizard will ask you to install it. Your device should now show up, and you will need to click on the **"Configure"**
55
-
button.
56
-
57
-

58
-
59
-
You will now be asked to name your device. In this case, a name was randomly generated, which is **Phil**. Click on **"Next"** to proceed.
60
-
61
-

62
-
63
-
After clicking on next, the board will start to configure. This process may take a few minutes.
Once it is done, we will be directed to the devices page, where we can see our device. Congratulations, you have just made your first device IoT ready!
After our device is configured, we can move on to the next step: creating our very first Thing. Click on the **"Things"** tab. You should now see a button that says **"Create thing"**, which we will need to click.
74
-
75
-

76
-
77
-
We will now see an interface with multiple options. This is your Thing configuration overview. Here we can select what network we are connecting to, what device we are using and create variables that we want to sync.
78
-
79
-

80
-
81
-
Let's start by linking our freshly configured device, by clicking on the **"Select Device"** button to the right. This will open up a window, where we can **"Associate"** the board with this Thing.
82
-
83
-

84
-
85
-
### Creating variables
86
-
87
-
Now, we can continue to create variables for our Thing. These variables will be synced with the cloud, as long as the board is connected to Internet and the cloud.
88
-
89
-
To create variables, simply click on the **"Add variable"** button. This will open up a new window.
Here, we will name our variable `temperature` and choose the data type `float`. Click **"Add variable"** at the bottom to add it.
94
-
95
-

96
-
97
-
Now, we need to add the rest of the variables in a very similar fashion, but changing the name. The variables that we need to add can be seen in the table below:
98
-
99
-
| Name | Data type |
100
-
| ----------- | --------- |
101
-
| humidity | float |
102
-
| illuminance | float |
103
-
| pressure | float |
104
-
|**uva**\*| float |
105
-
|**uvb**\*| float |
106
-
|**uvIndex**\*| float |
46
+
| Name | Data type | Permission |
47
+
| --------------- | --------- | ---------- |
48
+
| humidity | float | Read Only |
49
+
| illuminance | float | Read Only |
50
+
| pressure | float | Read Only |
51
+
|**uva**\*| float | Read Only |
52
+
|**uvb**\*| float | Read Only |
53
+
|**uvIndex**\*| float | Read Only |
107
54
108
55
>**Note:** the `uva`, `uvb` and `uvIndex` variables will only work with the MKR ENV Shield v1. Newer versions does not have the UV sensor. If you have a newer version, do not add these variables. You can read more about the different versions in the this [Arduino Help Center article](https://support.arduino.cc/hc/en-us/articles/360019197540-Different-MKR-ENV-Shield-versions).
109
56
110
57
When we have added these, the variable list will look something like this:
111
58
112
-

59
+

113
60
114
-
Now as a final part of the configuration, we just need to add our network details. Click on the button in the **Network** section, and enter your credentials to your Wi-Fi network.
61
+
- Set up your [MKR WiFi 1010](https://store.arduino.cc/products/arduino-mkr-wifi-1010)and configure your network credentials.
115
62
116
-

117
63
118
64
## Creating the program
119
65
120
66
Now, the final thing needed is the actual program that will run on the MKR 1010 board. We can edit the program directly in the Arduino Cloud, by clicking on the **"Sketch"** tab. This will open up the built-in editor, where we can write the program directly.
121
67
122
-

68
+

123
69
124
70
For the program, we will need to include the **Arduino_MKRENV** library, which is used to read all the sensors. Below is the code that will allow us to do so, and you can see that the variables in the code is identical to the ones we just created.
125
71
@@ -177,7 +123,7 @@ void loop() {
177
123
178
124
Once the code has been uploaded, open the Serial Monitor (tab next to sketch) to initialize the program. If everything went well, it should like the image below:
179
125
180
-

126
+

181
127
182
128
The most important thing is that the two following commands are printed:
183
129
@@ -187,31 +133,31 @@ Connect to the Arduino Cloud
187
133
```
188
134
### Over the Air Uploads
189
135
190
-
Did you know that the Arduino Cloud supports overtheair uploads? When you've uploaded a sketch to your board once, it will become available for you to upload a new sketch to the board without connecting it to your computer!
136
+
Did you know that the Arduino Cloud supports over-the-air uploads? When you've uploaded a sketch to your board once, it will become available for you to upload a new sketch to the board without connecting it to your computer!
191
137
192
-
***Over the Air uploads require an Entry plan to the Arduino Cloud***
138
+
***Over the Air uploads require an Entry plan to the Arduino Cloud. Read more about it [here](/arduino-cloud/features/ota-getting-started)***
193
139
194
140
To use this feature, make sure the board has power. If your board is already connected to the Cloud, you will be able to upload to it over the air. Navigate to the Things sketch tab in the Arduino Cloud interface, and you should see it being discovered just as if it was connected via USB.
195
141
196
142
## Building a dashboard
197
143
198
144
Once we have confirmed that the board is connected to the cloud, the last step is to build the dashboard that we can monitor the environmental data in. Click on the **"Dashboards"** tab, which will take you to the dashboards page. Here, we need to click on the **"Build Dashboard"** button.
199
145
200
-

146
+

201
147
202
148
We will now see an empty dashboard, where we are now going to create something called **widgets**. Widgets are the visual representation of our variables. There's two ways of creating widgets: either we add them one by one, and link them manually, or we can add and link **them all at once**. To save some time, let's do that!
203
149
204
150
Simply click on the **"Add"** button, and a dropdown menu will appear. Here we will click on **"Things"**, and select the Thing that appears here.
205
151
206
-

152
+

207
153
208
154
In this case, we changed the name to **Environmental Data**, but whatever you name your thing will appear here. By clicking on it, it gives you a list of variables with a checkpoint, and we can simply click **"Create widgets"**
209
155
210
-

156
+

211
157
212
158
All new widgets will now appear here, and when the board is connected to the cload, it will continue to update these values.
0 commit comments