/m5stickc-restful-weather

M5stick-c RESTful weather to fetch (tempreture, humidity and air pressure) using the DHT12 hat (ENV)

Primary LanguageC++

M5stick RESTful weather

M5stick-c RESTful weather to fetch (tempreture, humidity and air pressure) using the DHT12 hat (ENV).

I created this project to replace the commercial devices and to integrate these to my local home system as per my requirements.

Installation

  1. Clone this project or download it on your local machine.
  2. Download Arduino IDE.
  3. Open Arduino IDE, and open the m5stickc-restful-weather.ino from this project.
  4. Add the ESP32 Board manager by going to (Preferences) then Add https://dl.espressif.com/dl/package_esp32_index.json inside the textfield of (Additional Boards Manager URLs) And click (OK) to save this change.
  5. Go to (Tools) menu then (Board) then (Boards manager) to allow the IDE to download the ESP32 board.
  6. Search for ESP32 and install it then close the window. (for me the version was 1.0.6)
  7. Now go to the (Tools) menu then (Board:) then (ESP32 Arduino) then Choose (M5stick C)
  8. Install the required libraries: M5StickC and ESP32_HTTP_SERVER. Go to (Sketch) menu then (Include library) then (Manage Libraries).
  9. Search for M5StickC and install the latest version. (for me the version was 0.2.0)
  10. Also, Search for ESP32_HTTP_SERVER and install the latest version. (for me the version was 1.0.0)
  11. Also, Search for Adafruit_BMP280 and install the latest version with it's all dependencies. (for me the version was 2.1.2)
  12. Install CP210x USB to UART driver from (Download) section from this link.
  13. Set your WiFi SSID and password by editing the m5stickc-restful-weather.ino file on line number 21 & 22.
  14. Now, you are good to connect your M5StickC and compile the code. Click to (Upload) button.

Photo of my M5stickC showing live weather details and the M5stickC IP: M5stick photo showing the live data

Screen shot of the JSON response when visiting the M5stickC IP: M5stick JSON format screenshot


Credits: Weather functionality from the M5stickC examples please go checkout the powerful examples in their repository.