element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Personal Blogs
  • Members
  • More
Personal Blogs
Legacy Personal Blogs Weather Station (Pimoroni Enviro Board)
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: cbohra00627
  • Date Created: 11 Jun 2021 11:02 AM Date Created
  • Views 841 views
  • Likes 2 likes
  • Comments 0 comments
  • environment
  • environmental_monitor
  • enviro hat
  • weather_station
  • raspberry pi 4 2gb
  • pimoroni
  • weather
  • raspberrypi
  • enviro phat
Related
Recommended

Weather Station (Pimoroni Enviro Board)

cbohra00627
cbohra00627
11 Jun 2021

Previous year, I got a Pimoroni Enviro board for a competition on E14. I was not able to complete my proposed project on time due to some technical issues and college exams (Well, the truth is that I was struggling with the Raspberry Pi the whole time, I wasted a lot of my time for just headless start of the raspberry pi but eventually I found out that the problem was with my memory card reader... LOLimage). Anyways, for some time I have been playing with this board.

Its features are:

  1. BME280 sensor (temperature, pressure and humidity)
  2. LTR559 sensor (light and proximity)
  3. MEMS microphone
  4. 0.96'' color LCD display

So, it has all the weather related sensors. So, I decided to make a weather station using it. I took help from the already given examples and they helped me a lot, in fact, I have used some code snippets from the examples also in my scripts, thus the main weather screen looks like the one in examplesimage .

 

The Enviro board can directly be stacked on the raspberry pi.

 

To install the python library for the enviro board, I ran the following one line command:

curl -sSL https://get.pimoroni.com/enviroplus | bash

 

This will download all the necessary code to run the Enviro board.

 

I have also tried to create a world weather option. You just need to enter the ISO country code and the zip code of the area. The code will fetch three day forecast (maximum and minimum temperature and maximum wind speed) of the entered area. I have used simple urrlib requests to fetch data from sites in json format to implement this.

 

First, I thought that I will just use APIs from any online weather service but then I found that almost all of them were asking to sign up on their sites to get to use the free APIs. And I was not willing to give my email to them (I don't like promotion mails). After much searching, I found a site which gives weather data of any area. The site is 7timer.info. But this site requires latitude and longitude of the location. So, to get the latitude and the longitude of the location, I used APIs from the Zippopotamus site. But this site doesn't support all the countries. The list of the supported countries is given on the main page of the site.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

The script needs to be run with the python3 interpreter and the '-B' is used to ignore the __pychache__ folder.

Maybe it is not visible in the video clearly, but in the world monitor, the background of each day shows the type of weather that day you will see.

 

Github link to code: weather_station

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube