You are on page 1of 6

10/12/2020 Send Sensor's Data to ThingSpeak Using ESP32 | Tutorials of Cytron Technologies

 Menu  SHOP

ESP32, IoT/Wireless
Send Sensor’s Data to ThingSpeak Using ESP32
by Idris November 6, 2019

Arduino, ESP32, ThingSpeak

IoT with ThingSpeak, Arduino and ESP32.

Introduction
Previously I have shared on how to send sensor’s data to ThingSpeak IoT platform using
Raspberry Pi. Now I want to try with ESP32. You may refer to this tutorial first to install ESP32
board package.

Data Logging Using Favoriot IoT Platform and ESP32

Video
This video will show you how to send sensor’s data to ThingSpeak by using ESP32 and
Arduino IDE.

Send Sensor's Data To ThingSpeak Using ESP32 [B…


[B…

https://tutorial.cytron.io/2019/11/06/send-sensors-data-to-thingspeak-using-esp32/ 1/6
10/12/2020 Send Sensor's Data to ThingSpeak Using ESP32 | Tutorials of Cytron Technologies

Hardware Preparation
This is the list of items used in the video.

Node32 Lite

MPL3115A2 I2C Barometric/Altitude/Temperature Sensor

Sample Program
This is Arduino sample program to read sensor’s data from MPL3115A2 module for every 2
seconds, and send it to ThingSpeak for 20 seconds time interval.

91 prevMillisSensor = millis();
92 }
93
94 if (millis() – prevMillisThingSpeak > intervalThingSpeak) {
95
96 // Set the fields with the values

97 ThingSpeak.setField(1, pascals);
98 ThingSpeak.setField(2, altitude);
99 ThingSpeak.setField(3, celsius);
100
101 // Write to the ThingSpeak channel

102 int x = ThingSpeak.writeFields(CHANNEL, WRITE_API);


103 if (x == 200) {
view raw
ESP32MPL3115A2ThingSpeak.ino
hosted with ❤ by GitHub 

https://tutorial.cytron.io/2019/11/06/send-sensors-data-to-thingspeak-using-esp32/ 2/6
10/12/2020 Send Sensor's Data to ThingSpeak Using ESP32 | Tutorials of Cytron Technologies

Thank You
References:

GitHub Adafruit MPL3115A2 Library


GitHub ThingSpeak Library

Thanks for reading this tutorial. If you have any technical inquiries, please post at Cytron
Technical Forum.

Show Comments

Cytron.io > Largest Digital Maker Marketplace @ Malaysia,


Singapore

Get your parts now!

RELATED TUTORAIL
https://tutorial.cytron.io/2019/11/06/send-sensors-data-to-thingspeak-using-esp32/ 3/6
10/12/2020 Send Sensor's Data to ThingSpeak Using ESP32 | Tutorials of Cytron Technologies

Send Data to Firebase Using Raspberry Pi

Send Data to Firebase Using Arduino Uno WiFi Rev2

Is it possible to upload files directly to Google Cloud?

Does Technology Make Us Feel Safe

Log Sensor Data from Sense HAT to Google Sheets using Raspberry Pi

Audio Doorbell Using M5GO IoT Starter Kit

https://tutorial.cytron.io/2019/11/06/send-sensors-data-to-thingspeak-using-esp32/ 4/6
10/12/2020 Send Sensor's Data to ThingSpeak Using ESP32 | Tutorials of Cytron Technologies

     

PREVIOUS NEXT
 Basic Usage of iMAX B6AC LiPo Charger Control Servo With Gesture Using ESP3… 

LATEST TUTORIAL

IoT/Wireless Raspberry Pi

Send Data to Firebase Using Raspberry Pi

3D Printing Raspberry Pi

Control and Monitor Your 3d Printer Using OctoPrint On Raspberry Pi

Raspberry Pi

Remote SSH Raspberry Pi Using Visual Studio Code

Raspberry Pi

Case Fan That Keeps Raspberry Pi 4 Model B Cool


https://tutorial.cytron.io/2019/11/06/send-sensors-data-to-thingspeak-using-esp32/ 5/6
10/12/2020 Send Sensor's Data to ThingSpeak Using ESP32 | Tutorials of Cytron Technologies
Case Fan That Keeps Raspberry Pi 4 Model B Cool

Raspberry Pi

Smart Door Announcer with Raspberry Pi

All Tutorials

Motor / Robot

Raspberry Pi

Maker UNO

Arduino

PIC

IoT / Wireless

Sensor

Largest Digital Maker Marketplace @ Malaysia, Singapore.

 SHOP

    
© 2007 - 2020 Cytron Technologies Sdn Bhd. All Rights Reserved

https://tutorial.cytron.io/2019/11/06/send-sensors-data-to-thingspeak-using-esp32/ 6/6

You might also like