M5stack How To Display Temperature, Humidity And Pressure...

About the project

In this tutorial we will learn how to program ESP32 M5Stack StickC with Arduino IDE and Visuino to Display the Temperature,Humidity Pressure

Project info

Difficulty: Easy

Platforms: ArduinoVisuinoM5Stack

Estimated time: 1 hour

License: GNU General Public License, version 3 or later (GPL3+)

Items used in this project

Hardware components

M5Stack M5StickC ENV Hat (DHT12, BMP280, BMM150) M5Stack M5StickC ENV Hat (DHT12, BMP280, BMM150) x 1
M5Stack M5StickC ESP32-PICO Mini IoT Development Board M5Stack M5StickC ESP32-PICO Mini IoT Development Board x 1

Software apps and online services

Visuino Visuino
Arduino IDE Arduino IDE

Story

In this tutorial we will learn how to program ESP32 M5Stack StickC with Arduino IDE and Visuino to Display the Temperature, Humidity and Pressure using ENV sensor (DHT12, BMP280, BMM150)

Step 1: What You Will Need

1 / 2

Step 2: Start Visuino, and Select the M5 Stack Stick C Board Type

1 / 2

Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1)

in Visuino When the dialog appears, select "M5 Stack Stick C" as shown on Picture 2

Step 3: In Visuino Set Components

1 / 9

  • Click with the right mouse button on the StickC board and select "Add Shields.."
  • In the Shields Dialog drag "EnvironmentHat" to the left side
  • Close the Shields Dialog and select the board and on the left side in the Properties window Expand on the Modules>Display ST7735
  • Set "Orientation" to goRight
  • Click on the "Elements" 3 dots (Picture 4)
  • In the Elements window drag 3x "Text Field" to the left side (Picture 5)
  • On the Left side of the dialog select "Text Field1" and in the properties window set "Size" to 2
  • On the Left side of the dialog select "Text Field2" and in the properties window set "Size" to 2 and "Y" to 20
  • On the Left side of the dialog select "Text Field3" and in the properties window set "Size" to 2 and "Y" to 20
  • Close The Elements Dialog

Step 4: In Visuino Connect Components

1 / 3

  • Connect "M5 Stack Stick C" board > Environment pin [Temperature] to "M5 Stack Stick C" board > Display ST7735 > TextField1 pin[In]
  • Connect "M5 Stack Stick C" board > Environment pin [Humidity] to "M5 Stack Stick C" board > Display ST7735 > TextField2 pin[In]
  • Connect "M5 Stack Stick C" board > Environment pin [Pressure] to "M5 Stack Stick C" board > Display ST7735 > TextField3 pin[In]

Step 5: Generate, Compile, and Upload the Arduino Code

  • In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Step 6: Play

If you power the M5Sticks module, the display should start to show the sensor values.

Congratulations! You have completed your M5Sticks project with Visuino. Also attached is the Visuino project, that I created for this tutorial, you can download it here. You can download and open it in Visuino: https://www.visuino.com

Schematics, diagrams and documents

Visuino File

Code

Visuino File

Credits

Photo of Ron

Ron

Arduino Developer

   

Leave your feedback...