The instruction walks you through the process of creating your own IoT device in just a few steps.
An example web dashboard that might be created can look like this:
Blynk is a cloud service provider allowing for building and managing connected hardware: device provisioning, sensor data visualization, remote control with mobile and web applications, over-the-air firmware updates and much more.
After you've created virtual environment, your current directory should be "iot-starter"
pip install -r Blynk/requirements.txt
First, you need to create an account on Blynk cloud website: blynk.cloud. Follow standard registration procedure providing your email and then activating the account.
After you first log in into your new account on Blynk,Console you'll be probably prompted with a quickstart device. Please close the window as we're going to do it manually.
Template will be used for creating your new IoT-Starter device.
- On the left side pane search for "Templates" option.
- Click on "+ New Template" with the name and description of your choice. Make sure to use hardware "ESP32" and connection type "WiFi". After creating the template you can modify it further adding an image, metadata etc.
- Now you need to create two "Datastreams" that are responsible for accepting telemetry data (temperature and humidity) from our device. To do that go to:
"Datastreams" --> "+ New Datastream" --> "Virtual Pin"
Please make two virtual pin datastreams for temperature and humidity. Please note which pin is responsible for each telemetry type (only number matters, so if you're assigning V0 to temperature, the pin responsible for the temperature telemetry is no. 0). Make sure that the "Data Type" is set to "Double". You can also add "Units" to the pins (Celsius for the temperature and percentage for the humidity) - it is optional though. Please also adjust the min and max value for each pin (0 - 100 for the humidity and for example 10 - 40 for the temperature) as well as check the "Thousands seperator" option. - After creating both virtual pins you can set up a web dashboard after clicking "Web dashboard" option. ("Mobile dashboard" can be only created in "Blynk IoT" mobile app.)
- Save the changes made to the template.
Device will be created from already created template, so all you need to do is:
- Click on the left side pane "Search" --> "+ New Device" --> "From template"
- Select your template and give some meaningful name to your device.
- Click on the created device and go to "Device info" and on the right side look for "BLYNK_AUTH_TOKEN". It should look like this:
#define BLYNK_AUTH_TOKEN "<long_sequence_of_random_characters>";
Copy this long sequence as you will need it in a moment.
After all steps above you should have saved three things:
- Virtual pin for temperature
- Virtual pin for humidity
- Device auth token