Header Ads

Header ADS

Weather Forecaster using ESP8266

In this post you’re going to build a weather forecaster with an ESP 8266 .I hate being out on a rainy day without an umbrella and I’m pretty sure it’s the same for everyone else.
Often, the weather widget on our smartphones displays the weather forecast but when you’re in a hurry you forget to pay attention to it.


Bill of Materials
  1. ESP 8266,
  2. 20X4 LCD display with i2c board,
  3. Jumper wires 4 Nos.

 Open Weather Map

This project is based on the Open Weather Map API, so it’s necessary to sign up on their platform and obtain an API key before we get down to putting together the schematics and writing the code.

OpenWeatherMap’s free plan provides everything you need for thins example. To use the API you need an API key, known as the APIID. To get an APIID:
  1.     Open a browser and go to OpenWeatherMap
  2.     Press the Sign up button and create a free account
  3.     Once your account is created, you’ll be presented with a dashboard that contains several tabs 
  4.     Select the API Keys tab and copy your unique Key
This is a unique key you need to pull information from the site. Copy and paste this key somewhere, you’ll need it in a moment.

To pull information on weather in your chosen location, enter the following URL with the sections in curly brackets replaced with your chosen location information and your unique API key:

http://api.openweathermap.org/data/2.5/forecast?q={your city},{your country code}&APPID={your API Key}&mode=json&units=metric&cnt=2

Replace {your city} with the city you want data for, {your country code} with the country code for that city, and {your API key} with your unique API key we found previously. For example, our API URL for the town of Porto in Portugal, after replacing with the details, would be:

http://api.openweathermap.org/data/2.5/forecast?q=Porto,PT&APPID=801d2603e9f2e1c70e042e4------&mode=json&units=metric&cnt=2

 Note: more information on using the API to get weather information is available here.
Copy your URL into your browser and it should give you a bunch of information that corresponds to your local weather forecast information.

Uploading code

Having the ESP8266 add-on for the Arduino IDE installed (how to Install the ESP8266 Board in Arduino IDE), go to Tools and select “NodeMCU (ESP-12E Module)”.
Download the following code to your Arduino IDE and upload it to your ESP8266 board. Click here
Go through the code to add your SSID, password, city, country code and Open Weather Map API key.

Find below for Video Preview.


8 comments:

  1. This is my first visit to your web journal! We are a group of volunteers and new activities in the same specialty. Website gave us helpful data to work. Ambient Weather WS-5300

    ReplyDelete
  2. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. La Crosse Technology C85845

    ReplyDelete
  3. buy twitch followers If you love playing video games, you can actually make that interest or hobby into something profitable. Many video game enthusiasts are being paid to play and test newly developed games or those that have just been released, and in return, they make good money from it.

    ReplyDelete
  4. https://www.visualaidscentre.com/service/eyes-specialist-delhi/ Nintendo is one of the simplest firms in the world to offer quality entertainment through video games. It is a fact that once you ask individuals about Nintendo, they can give you a similar or nearly the same answers, which is video gaming. It's also a truth that Nintendo is one of the pioneers in trendy video gaming technology. They need paved the approach for different firms to even turn out game systems which will really entertain different individuals from all over the world.

    ReplyDelete
  5. https://dynamichealthstaff.com/nursing-jobs-in-qatar This article offers free SEO tips that will take readers from novice to intermediate search engine marketers. We cover all of the basics of driving traffic to a website...

    ReplyDelete
  6. https://www.buyyoutubesubscribers.in/2022/01/10/which-youtuber-has-most-subscribers/ YouTube is one of the most popular websites in the world. If you want to supplement your income, there are a number of ways to make money online by using YouTube. Webmasters and bloggers use this site to generate leads for their online business.

    ReplyDelete
  7. https://www.visualaidscentre.com/lasik-eye-surgery-in-delhi/ Narcopaths (malignant narcissists, narcissistic sociopath) are masters at playing mind games. They play to win and take no prisoners. They are sore losers and if they don't win they will often react in a fit of rage and stomp away like a little child. I have to say upfront, I am not comfortable calling what a narcopath does to us as games, but I can't think of a better alternative. I used manipulation characterized as games, but that's a mouthful. Anyway, every therapist I've talked with uses the term, so I will, too. When I think of games, I think of fun, laughter and enjoying myself. Nothing about my experience with the narcopath comes even close, so it's hard for me to think of the narcopath and games in the same setting. Polar opposites in my mind.

    ReplyDelete
  8. https://hostinglelo.in There are many places that offer free online games for a person to fill their spare time with. There is a countless number of people who participate in online games each day, and many of those people would admit to how addictive these games can be.

    ReplyDelete

Powered by Blogger.