<<

Paging Baron Pandastein

Nearly two years ago, this panda and I went to Howduino in Liverpool where he underwent surgery to implant tri-colour LEDs and a moving-coil meter into his protesting body. Today we went to Howduino at the Temple Works in Leeds, and the surgery was completed.

In his midriff he’s got an old aircraft fuel-flow meter – it’s basically a moving coil voltmeter with a dial calibrated from 0 to 800 pounds per hour. From the markings on the back, it looks like it came from a 1950s-vintage V bomber – possibly a Valient.

This was born of a distinct lack of web data sources that are calibrated in hundreds of pounds per hour (and that have a maximum of 800), and general hair-trigger punctuality geekiness.

It takes me exactly 4 minutes to walk to the nearest bus stop, but if I leave with more than 8 minutes to spare I end up feeling like a delinquent teenager while I hang around the shelter waiting for the bus to arrive. So this panda is connected to the interwebs via an Arduino, and is polling Travel South Yorkshire’s really-rather-badly-designed Your Next Bus site.

He shows the number of minutes to the next bus arriving – less than 4, and there’s no point in me leaving the house because I won’t get to the stop in time. More than 7 minutes, and I don’t need to go yet.

The electronics side of it is fairly trivial – it takes a PWM output from the Arduino and feeds that through a voltage divider to step the signal down to a maximum of 0.15V (which is the full-scale deflection voltage of the meter). There’s a variable resistor in the divider so that the accuracy of the meter can be tweaked as needed.

The code is also fairly simple, using the Arduino’s Ethernet and HTTP libraries to access the web, and the TextFinder library to parse the page that’s grabbed from the SYT site. I’ll put the code up on Github in a day or so.

In the video, he’s in test mode – so he’s polling a random number on a page on my site, which is why the dial is flying around all over the place. Eventually (i.e. when I next go to a Howduino event, probably) his eyes will light up as well, and will fade from green to amber to red as the bus gets closer. But that will probably take another two years…