Ambient Weather Indicator


Another great use for BlinkyTape comes to us from our forum user Eric C. aka “revsin.” Like our last post this is an ambient information visualizer – but for a very different purpose. Eric is a motorcyclist and wants to know at a glance if it’s going to be dry for the next few hours – i.e. whether or not it’s a safe time for a ride.

In order to do this, he’s writing a python script that quickly scrapes a weather website for the next few hours of weather and then writes it out to his BlinkyTape – each LED corresponds to a few minutes.

Very awesome – click through to for the python!

Here’s the script:

def clocking():
while True:
bb = BlinkyTape(‘/dev/tty.usbmodem1441’)

url = ‘’

website = urllib2.urlopen(url)
html =

regex = ‘<span class="time">(.+?)</span>.*<span class="type">(.+?)</span>’
pattern = re.compile(regex)
clockandprecip = re.findall(pattern,html)
wlist = []

for i in clockandprecip: # [::5] limits to every 5 minutes
condition = i[1]
time = i[0]

if condition == ‘No Precipitation’:
rgb = 255,0,0
print rgb
rgb = 0,255,0 # green
print rgb
for d in range(60):
for x in wlist[::2]: # limits to every other minute



As an aside, these last two projects show that python is a great way to program for ambient installations – not only it python a great language, it runs on both PC hardware or embedded machines (i.e. Raspberry Pi or Beaglebone) with minimal changes!

Leave a Reply

Your email address will not be published. Required fields are marked *