Skip to content

A simple Sinatra app that turns your Raspberry Pi in a mini weather station.

Notifications You must be signed in to change notification settings

cannikin/pi_weather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raspberry Pi Weather Station

Here's a real simple web app that displays the current temperature and humdity as reported by an SHT15.

screenshot

It also provides a RESTful endpoint for simplying returning the temperature and humidity in JSON.

Usage

This won't include a guide for installing and running a Sinatra app, but here are the basics:

  1. Clone this repo: git clone [email protected]:cannikin/pi_weather.git
  2. Run bundler to install required gems: bundle install
  3. Start the app. You need to run it as root since the Pi requires root access to access the GPIO ports: sudo ruby app.rb

Now just point your browser to http://localhost:4567 and you should see the temp and humdity. The page will hit the RESTful endpoint every 5 seconds to keep the page up-to-date. That endpoint lives at http://localhost:4567/read

About

A simple Sinatra app that turns your Raspberry Pi in a mini weather station.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published