We use many kinds of IoT products that can work with smartphones. For example, Bluetooth earphones and AI speakers are included and are used. According to the Statista(Germany online statistics) survey, Korea has 94% of the smartphone users which is the world’s number 1.
IoT products can be easily interfaced and created with this high smartphone penetration and the current environment. As the number and type of IoT products are rapidly increasing, cloud services that can be used to develop IoT products are also increasing too.
In this article, we will introduce free cloud services called Dweet.io and Blynk to use with WizArduino MEGA WIFI based on Arduino MEGA Wi-Fi function.
STEP 1. Project Operation Overview
- Dweet io
To use Dweet.io cloud service, you need to sign up for the membership and your IoT terminal must be able to access the cloud server. We will use the WizArduino MEGA WIFI to connect to the cloud server and update the data in the Dweet.io dashboard. Dweet.io needs to be using HTTP POST method when you update the data.
The Blynk service is provided as a smartphone unlike Dweet.io, so you can configure your dashboard through your smartphone. You need to install the application and register with the smartphone OS to use Blynk service. When you sign up and create a dashboard, you will receive a token that authenticates the device.
STEP 2. Preparations
2-1. WizArduino MEGA WIFI (Detail and Buy)
2-2. Arduino S/W (Download)
STEP 3. Hardware connection
WizArduino MEGA WIFI includes Wi-Fi function, so you do not need a separate shield and you can connect the sensor for each project. The pin map of WizArduino MEGA WIFI is as follows. Please refer to the following link for more details.
STEP 4. Source code link and key code description
In the case of Dweet.io, the example is included in the Arduino WizFi310 library, so you can easily link it with the Dweet.io service by installing the library. Click the Sketch menu – Include Library – Library Management to search for WizFi310, then click the install button.
Once the installation is complete, click File in the menu – Example – WizFi310 – Dweet_PostSensingData then modify the AP information and the last part of the POST Method Url.
Let’s start by installing and configuring Blynk Application to use Blynk service on the smartphone. You also need to sign up for it.
Create the project as follows after you registered.
A token for device authentication is issued to the subscribed email address when the project is created normally.
Tap the ‘+’ in the upper right corner to add the widget if the project was successfully created.
The widgets used in this article are Value Display and Graph. Add the widget and set the size appropriately.
Value Display is set to V0 and Graph is set to V1, and the value is output from 0 to 1023 if the widget is created.
In order to connect Blynk Application installed on smartphone and WizArduino MEGA WIFI, you should get the library of Arduino. Click “sketch” from the menu – Include Library – Library Management to search for Blynk, and then click the install button.
After getting the source from the link below, modify the AP information and the Blynk Token value.
It sends the sensorData to V0 and V1 defined in the widget of Blynk Application in the function of sendUptime(). The function is executed once every second using a timer library. The current source is to increase the sensorData once every second. But, you can update the sensing values by connecting sensors such as temperature and humidity depending on the IoT application.
Full source can be downloaded from the link below.
STEP 5. <Project Result>
Enter the following link (https://dweet.io/follow) to check the data sent from WizArduino MEGA WIFI and then, input the last part of POST URL among the modified Arduino source then, you can see the data sent from the terminal through the graph.
If you have modified WizArduino MEGA WIFI source properly, you can see that the value is updated through the created widget. If you haven’t modified the source, you can see that the value increases once per second.
We have learned how to connect with cloud services(Dweet.io, Blynk) that can be used in IoT projects, how to send data of IoT terminal to cloud service, and how to check the data through widget such as graph in cloud service. If you use cloud services like this, you can build your dashboard environment without implementing your own server.
I hope that this opportunity will enable you to experience the cloud services and to use other cloud services even though it is not the Dweet.io and Blynk service that I mentioned.