Hardware

Software Used

Library Used

Arduino Client for MQTT

This library provides a client for doing simple publish/subscribe messaging with a server that supports MQTT.

For more information about MQTT, visit mqtt.org.

Download

The latest version of the library can be downloaded from GitHub

Documentation

The library comes with a number of example sketches. See File > Examples > PubSubClient within the Arduino application.Full API Documentation.

Compatible Hardware

The library uses the Arduino Ethernet Client api for interacting with the underlying network hardware. This means it Just Works with a growing number of boards and shields, including:

Wire Library

The Wire library allows you to communicate with I2C devices, often also called "2 wire" or "TWI" (Two Wire Interface), can download from Wire.h

Basic Usage

Transmitting

Receiving


Uploading the Code to ESP32 Using Arduino IDE

Serial Monitor Output

Making the Ubidots Work

 Click on devices and select devices in ubidot.

 Now you should see the published data in your Ubidots account, inside the device called "ESP32".

Now you are able to view the Temperature and other sensors data which was previously viewed in serial monitor .This  happened because the value of  different sensor readings  is passed as a string and store in variable and publish to variable inside  device esp32. 

Create Dashboard in Ubidots

Output

Export Your Ubidots Data to Google Sheets

In this we can extract the data stored in the Ubidots cloud for further analysis. The possibilities are enormous; for instance, you could create an automatic report generator and send it to your customers every week.

Another application would be device provisioning; if you have thousands of devices to deploy, and their information is in a Google Sheet, you could create a script to read the sheet and create a Ubidots data source for every line on the file.

Steps to do this:

Result