This project shows how to create a weather station monitored by Arduino Cloud.
No matter if you’re an agriculturalist, a professional meteorologist, or simply a weather enthusiast, creating your own weather station can be an incredibly fulfilling endeavor. But when it comes to measuring weather accurately, you’ll require some specialized sensors. With the combination of the Sparkfun MicroMod Weather Carrier Board and the Sparkfun Weather Meter kit you can build your own weather monitor station very easily.
-
https://www.sparkfun.com/products/16794 [SparkFun MicroMod Weather Carrier Board]
-
It has a M.2 socket where the microprocessor board will be inserted
-
It includes the BME280 temperature, pressure and humidity sensor, the VEML6075 UV sensor and the AS3935 Lightning detector.
-
-
-
It includes the three fundamental components for weather measurement: wind speed, wind direction, and rainfall
-
Follow these instructions to assemble the kit: . Insert the MicroMod ESP32 Processor board into the M.2 socket of the carrier board . Connect the carrier board to your computer using a USB-C cable . Assemble the weather kit and connect it to the carrier board following the instructions
Although the full process of creating a device, thing and dashboard is described in the following article you can follow this simple instructions
-
Open the Arduino Cloud Devices tab and add a Device
-
Follow the instructions to add the device and note down the Device ID and Key
-
-
Open the Arduino Cloud Things tab and add a Thing
-
Associate the previously created device
-
Add the variables listed in the Variables section
-
Configure the Network credentials and Device key obtained in the first step
-
-
Open the Sketch tab (this is the IoT Cloud editor) and paste the content of the Spkfn_Weather_Station.ino file
-
Edit the line that includes the code
#define ARDUINO_CLOUD_PLAN ARDUINO_CLOUD_PLAN_MAKER
-
Set it to your plan:
ARDUINO_CLOUD_PLAN_FREE
,ARDUINO_CLOUD_PLAN_ENTRY
orARDUINO_CLOUD_PLAN_MAKER
-
-
-
Click on "Open full editor"
-
Open the "Library Manager" in the "Libraries" tab
-
Search and mark as Favorite (click on the star) the following libraries:
-
SparkFun AS3935 Lightning Detector Arduino Library
-
SparkFun BME280 Arduino Library
-
SparkFun VEML6075 Arduino Library
-
SparkFun Weather Meter Kit Arduino Library
-
-
-
Back in the IoT Cloud Editor, click on Verify and Upload
Tip
|
Instead of doing the process manually, you can create the Thing and Dashboard using the Cloud CLI and the templates that can be found in the arduino-cloud folder. More information in this article |
Create the variables according to the following rules:
Name | Permission | Type | Update Parameter | Update Strategy | Variable Name | Starting Plan |
---|---|---|---|---|---|---|
temperature |
READ_ONLY |
FLOAT |
1 |
TIMED |
temperature |
all |
rain |
READ_ONLY |
FLOAT |
1 |
TIMED |
rain |
all |
windDirection |
READ_ONLY |
FLOAT |
1 |
TIMED |
windDirection |
all |
windSpeed |
READ_ONLY |
FLOAT |
1 |
TIMED |
windSpeed |
all |
pressure |
READ_ONLY |
FLOAT |
1 |
TIMED |
pressure |
all |
soilMoisture |
READ_ONLY |
FLOAT |
1 |
TIMED |
soilMoisture |
Entry |
humidity |
READ_ONLY |
FLOAT |
1 |
TIMED |
humidity |
Entry |
lightningDistance |
READ_ONLY |
FLOAT |
1 |
TIMED |
lightningDistance |
Entry |
lightningOccurred |
READ_ONLY |
BOOLEAN |
1 |
TIMED |
lightningOccurred |
Entry |
uvIndex |
READ_ONLY |
FLOAT |
1 |
TIMED |
uvIndex |
Entry |
uva |
READ_ONLY |
FLOAT |
1 |
TIMED |
uva |
Maker |
uvb |
READ_ONLY |
FLOAT |
1 |
TIMED |
uvb |
Maker |
The Starting Plan column indicates with which plans you can start using the variables. See the Note. So, for example, you only have to create uvIndex variable if you have an Entry or superior plan (Entry, Maker or Maker+).
Note
|
Note on the maximum number of variables
Depending on your Arduino Cloud subscription, you have a limit on the number of maximum variables that you can configure.
Check the full list of supported features for each plan. |
To create the dashboard, open the Arduino Cloud Dashboards tab and click on CREATE.
You can easily customize your dashboard manually adding the widgets and linking your variables to them. As a reference take a look at the screenshot in the assets folder.
Note
|
If you want to learn more about dashboards, you can check this article and to learn more about how to use them in the Getting Started guide. |
Alternatively, you can import the template located in the arduino_cloud folder following these instructions:
-
Initialize your credentials (this only has to be done the first time)
arduino-cloud-cli credentials init
-
Download the YAML template file
-
Create the dashboard using the template file
arduino-cloud-cli dashboard create --name <your_dashboardName> --template Spkfn_Weath_Station-dashboard.yaml --override Spkfn_Weather_Station=<your_thing_ID>
Note
|
You can get your_thing_ID from the Metadata section of your Thing. |
Note
|
Check the full documentation of the Arduino Cloud CLI in this article. |
To contribute to this project please contact: d.beamonte@arduino.cc
This document is written in the AsciiDoc format, a markup language to describe documents. If you need help you can search the AsciiDoc homepage or consult the AsciiDoc cheatsheet