In this post, we will discuss How-to-Build-Your-Own-Anemometer-Using-Reed-Switches-Hall-Effect-Sensor-and-Some-Scraps-on-Nodemcu-Part-2-Software: This is the sequel to the first post “How to Build Your Own Anemometer Using Reed Switches, Hall Effect Sensor and Some Scraps on Nodemcu – Part 1 – Hardware“ – where I show how to assemble the wind speed and direction measurement devices. Here we will exploit the measurement control software designed for use in a Nodemcu using the Arduino IDE.
In the previous post, the devices armed and connected to the Nodemcu are able to measure the speed and direction of the wind. The control software was designed to read the rotation of the anemometer for a period of time, calculate the linear velocity, read the direction in which the vane is, show the results in the OLED, publish the results in ThingSpeak and sleep for 15 minutes until the next measurement.
How to Build Your Own Anemometer Using Reed Switches, Hall Effect Sensor and Some Scraps on Nodemcu – Part 2 – Software:
Disclaimer: This anemometer should not be used for professional purposes. It is only for academic or home use.
Note: English is not my natural language. If you find grammatical errors that prevent you from understanding the project, please let me know to correct them. Thank you so much.
Step 1: Installing Arduino IDE, ESP8266 Boards, and Libraries and Your ThingSpeak Account
Installing Arduino IDE and Nodemcu
If you have never installed the IDE the Arduino please read the tutorial in the link – How to install Arduino IDE – where you can find the complete instructions.
Next step, to install the Nodemcu board use this tutorial from the Magesh Jayakumar Instructables which is very complete. How to install Nodemcu no Arduino IDE
Next step you must install the libraries that the sketch uses. They are common and you can follow the steps shown below.
ThingSpeak Library – https://www.arduinolibraries.info/libraries/thing-speak
ESP8266 Library – https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/readme.html
Creating a ThingSpeak Account
To use the ThingSpeak (https://thingspeak.com/) you must create an account (it is still free for a certain number of interactions) where you can save the data measured in your anemometer and monitor the wind conditions in your home, even via cellphone. By using ThingSpeak, you can give the public access to your collected data to whoever is interested. That is a good advantage of the ThingSpeak. Enter the homepage and follow the steps to create your account.
Once the account is created, enter this tutorial – ThingSpeak Getting Started – to create your channels. It’s pretty well explained. In summary, you must create a channel where the data will be stored. This channel has an ID and a Key API that should be referenced in the sketch each time you want to record data. ThingSpeak will store all the data in a bank and will show them every time you access your account, in the way you configured.