The bicycle barometer takes data about the weather, the status of tube lines and stations and displays a value on a dial.
Python Io HTML
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


The bicycle barometer takes data about the weather, the status of tube lines and stations and displays a value on a dial. Video here.

Note: this code is a very scrappy minimum viable product, but I'm releasing it early as there has been lots of interest. There is a long todo list on the github issue tracker for this repo, feel free to fork and get involved.

The instructions here are for a Nanode, hopefully someone will get it working for an Arduino + ethernet shield and submit a pull request.

The code currently only works for UK weather and the London Tube system, Hopefully people will add wider coverage of transit systems and countries.

The bicycle barometer consists of two parts:

  1. A web app that does the hard work of looking up the weather and tube status, and reduces them down to a single number
  2. The device (a Nanode microprocessor plus servo), which looks up the number from the web app and moves a servo.

What you will need

Setting up the web component

If you like you can skip this part and use the instance of the web app deployed at (although it is hard coded to a particular tube line)

Register for the Met Office DataPoint API

  1. Register
  2. Make a note of the API key

Setting up a local development copy

  1. Install and setup virtualenv:

    $ easy_install virtualenv
    $ virtualenv .
    $ source bin/activate
  2. Install requirements:

    $ pip install -r requirements.txt
  3. Add the met office api key:

  4. Run the app:

    $ python web/

Deploying to heroku

  1. Create an account on and install the toolbelt
  2. Create a new heroku instance

    $ heroku create
  3. Deploy:

    $ git push heroku master
  4. Add the met office api key

    $ heroku config:add METOFFICE_DATAPOINT_KEY=ExAmPlEkEy

Programming the nanode

  1. Install the Arduino IDE app
  2. Follow these instructions to get your Nanode up and running.
  3. Find out the mac address of your nanode and make a note of it. You need to run a script to do this.
  4. Open the sketch device/nanode/ in the Arduino IDE app
  5. Edit the mac address
  6. Edit the following line to point at the web app: char website[] PROGMEM = "";
  7. Attach the servo to pin 9 and on the Arduino
  8. Upload the sketch to your Nanode