GBoard Setup
At first we need to setup the GBoard correctly. I will not explain it here, because everything you need to know is well documented in the M2M Developer Community, which is part of the Developer Garden. If you click here, you will see the Developer Platform documentation. Than go to the section "Getting started with Deutsche Telekom M2M DevStarter Arduino".
There are also some sample sketches explained. For example, how to register your Arduino at the developer platform and how to send a measurement.
The hardware now looks like this:
The hardware now looks like this:
The Coding
Now lets do a bit programming. As base, code snippets from the SendMeasurement and RaiseAlarm sketch are used. In the picture above you can see that I also added a light sensor. A temperature sensor could be added, too.
After a bit of searching in the Arduino forum I found this post. Here, somebody posted a code where they used a kind of simulated AC because DC let the nails or other metal sticks corrode faster.
The full code can be found here.
After a bit of searching in the Arduino forum I found this post. Here, somebody posted a code where they used a kind of simulated AC because DC let the nails or other metal sticks corrode faster.
The full code can be found here.
The Web Application
Of course we want to have a nice interface, where you can see your collected data. To do that, I used the energy app which is part of the end-to-end example of the developer platform. To view my collected data, I didn't had to change a lot. I just modified the name of the variable "yField" to the "moisture", because I stored the measurements with this name in the platform. The variable "yTitle" I changed to "Moisture (%)" because I save the soil moisture in percent.
After a bit more modification the result looked this:
![]() |
| Login screen |
![]() |
| Graph |



No comments:
Post a Comment