We think there’s something in the water in Southend on Sea, on the east coast of England: there’s a really flourishing local Raspberry Pi community there, with a very busy Raspberry Jam (follow them on Twitter), a pretty Pi-centric weekly Linux User Group (SoSLUG), and a small army of Pi users we seem to bump into regularly at events. Those users include Digital Girl of the Year 2016, the very clever Yasmin Bey (Yasmin’s giving a talk about young people and computing on our stand at Bett tomorrow, if you’re at the event); and STEM ambassador Jane “ChatnStitcher“, who inadvertently became the first person in the UK to own a Pi Zero when she found a copy of The MagPi on a newsstand in London a day before the magazine was supposed to launch. Big wave to all the Southend Raspberry Pi users from here at Pi Towers in Cambridge – we hope plenty of you are coming to our fourth birthday party in March!
Richard “Average Man vs Raspberry Pi” Saville, whom I have great difficulty not greeting as “Average” when I meet him in real life, is another Southender, who lives beside the seaside. (Beside the sea.) Average makes a number of affordable prototyping boards for the Raspberry Pi, and used one in this project: they’re a great buy, and I particularly recommend his ProtoCam board, which I’ve found very useful on several occasions.
Southend on Sea lies at the mouth of the Thames estuary. If you venture out to the seafront at the wrong time of day, you’ll be greeted with a view of miles of mud. I’m of the view that sea-mud is more interesting and attractive than the fen-mud that we get in Cambridgeshire, 70 miles from the beach, but Average is resolute: no muddy vistas will spoil his walks.
Average’s solution: use a Raspberry Pi to build a high tide-tracker.
How does it work?
The code used in this project is actually a mash-up of the Python I learnt from two previous projects – my Raspberry Pi Social Network monitor (based on the RasPi.TV Kickstarter tracker project) and the clock example that came with the 7-Seg kit. It’s great to learn programming from others, but it’s even better if you learn them well enough to remember, re-use and combine that code later on as well.
First let’s first summarise what my code does:
- Setup – Imports, GPIOs, segment characters etc
- URL check (every hour or so) – check the URL and pull back next high tide time
- Display next high tide time on the display
It really is that simple – start up, check the URL and display data. I haven’t added anything else at this stage which means it’s still a bit ‘rustic’, although I may work on another version that includes more features with buttons/LEDs etc.
Richard has made complete instructions on the build and all the code you’ll need available at his website. Perfect for seaside-dwelling Pi users. Useful for sunset and sunrise calculation for the rest of us. Thanks Richard: we really don’t think you’re average at all!