กลับไปหน้ารวมไฟล์
arduino-mkr-weather-monitor-eb9804-en.md

We got some of the brand new MKR ENV shields some days ago. These shields have several sensors (temperature, air pressure, humidity, UV.... ) on board - a good collection to create a simple weather station together with our ArduiTouch MKR kit. We've used an Arduino MKR 1010 with WiFi as main board to receive some weather information for a simple forecast by openweather map.org.

So the display of the ArduiTouch will show a simple forecast and outside temperature together with the measured indoor temperature, air pressure and humidity.

simple weather monitor

A detailed assembly instruction for the ArduiTouch MKR kit can be found on our website.

After the assembly of the ArduiTouch Kit itself you have to plug the Arduino MKR 1010 and the MKR ENV Shield on the backside of the PCB:

Backside with mounted Arduino MKR 1000 and MKR ENV shield

Install the following libraries through Arduino Library Manager:

AdafruitGFX Library

https://github.com/adafruit/Adafruit-GFX-Library/archive/master.zip

AdafruitILI9341 Library

https://github.com/adafruit/Adafruit_ILI9341

Arduino JSON Library 5.x

https://github.com/bblanchon/ArduinoJson/tree/5.x

You can also download the library also directly as ZIP file and uncompress the folder under yourarduinosketchfolder/libraries/

After installing the Adafruit libraries, restart the Arduino IDE.

Some changes in the source code are required for customisation:

WiFi: Please enter the SSID and password in the lines 63 and 64

char* ssid ="yourssid"; // SSID of local network

char* password ="yourpassword"; // Password on network

Account forOpenWeatherMap:

To receive later data by the platform OpenWeatherMap you will need an own account. Sign uphere to get an API key: https://openweathermap.org/appid

Enter your API key in line 71:

String APIKEY = "your_api_key";

Your location:

Go to https://openweathermap.org/find?q= and search for a location. Go through the result set and select the entry closest to the actual location you want to display data for.It'll be a URL like https://openweathermap.org/city/2657896. The number at the end is what you assign to the constant below. Enter the number of your location in line 72

String CityID = "your_city_id";

Time: Please choose your timezone in line 73

\tintTimeZone = 1;

Please open this sample in the Arduino IDE. Compile and upload it.

EXPANDED TECHNICAL DETAILS

Low-Power Environmental Logging

Utilizing the professional-grade Arduino MKR series, this project is designed for long-term, battery-operated weather monitoring in remote locations.

  • Sensory Processing: Integrates high-accuracy BME280 (Temp, Humidity, Pressure) and VEML6070 (UV Index) sensors over the I2C bus.
  • Integrated Battery Management: The MKR board handles LiPo battery charging and features a low-power "Deep Sleep" mode, only waking up every 5 minutes to take a measurement and update the log.

Cloud Synchronization

  • Arduino Cloud Dashboard: Sensor data is synced via WiFi or GSM to the Arduino IoT Cloud, providing a professional-grade web dashboard for analyzing long-term climate trends.

ข้อมูล Frontmatter ดั้งเดิม

title: "Arduino MKR Weather Monitor"
description: "Simple weather station with WiFi forecast and measuring of temperature, humidity, air pressure via MKR ENV shield."
author: "hwhardsoft"
category: "Screens & Displays"
tags:
  - "weather"
  - "environmental sensing"
  - "data collection"
views: 23658
likes: 22
price: 2450
difficulty: "Intermediate"
components:
  - "1x MKR ENV Shield"
  - "1x ArduiTouch MKR kit"
  - "1x Arduino MKR1000"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "63c0493f652cff8959ec8327a2dd506440d70cc3f760804e4320cf9f4bda4fb9"
encryptedPayload: "U2FsdGVkX1+Hxiu/OcqfwvAxCdGqAICWhT9eHUE4gcTscmskD7O3NuyRhsMeqHo9CaZv2ZPGL1TsDBFcyotf/X5NMSAqFDL+TSHmXCPkb3g="
seoDescription: "Build an Arduino MKR Weather Monitor with WiFi forecast and sensors for temperature, humidity, and air pressure using the MKR ENV shield."
videoLinks:
  - "https://instagram.com/p/Bvt-Sl7ojzj/embed/"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/arduino-mkr-weather-monitor-eb9804_cover.jpg"
lang: "en"