Posting the sensor data online
Using the Arduino MKR1000 board and the sensors that we connected to it, we are finally going to log data online, using the Dweet.io service.
Getting ready
For this recipe, you simply need to have the previous recipe up and running, so make sure you have all the sensors connected to your board, and that you have tested them with the test sketch.
You should already have it by now, but make sure that you have the Arduino WiFi101
library installed inside the Arduino IDE.
How to do it...
We are now going to configure the board so it sends the measurements from the sensor to Dweet.io at regular intervals. As this sketch is quite similar to what we already saw in previous chapters, I will only highlight the most important parts of the code here:
- First, we need to define the libraries that we are going to use in this project:
#include <SPI.h> #include <WiFi101.h> #include "DHT.h"
- Then, we need to define a name for our thing on Dweet.io, which is the...