When Martin Mander’s portable Hitachi television was manufactured in 1975, there were just three UK channels and you’d need to leave the comfort of your sofa in order to switch between them.
Today, we have multiple viewing options and even a cool Raspberry Pi TV HAT that lets us enjoy DVB-T2 broadcasts via a suitable antenna. So what did nostalgia-nut Martin decide to do when he connected his newly purchased TV HAT to the Pi’s 40-pin GPIO header? Why, he stuck it in his old-fashioned TV set with a butt-busting rotary switch and limited the number of channels to those he could count on one hand – dubbing it “the 1982 experience” because he wanted to enjoy Channel 4 which was launched that year.
Going live
Martin is a dab hand at CRT television conversions (he’s created six since 2012, using monitors, photo frames, and neon signs to replace the displays). “For my latest project, I wanted to have some fun with the new HAT and see if I’d be able to easily display and control its TV streams on some of my converted televisions,” he says. It’s now being promoted to his office, for some background viewing as he works. “I had great fun getting the TV HAT streams working with the rotary dial,” he adds.
Although Martin jumped straight into the HAT without reading the instructions or connecting an aerial, he eventually followed the guide and found getting it up-and-running to be rather straightforward. He then decided to repurpose his Hitachi Pi project, which he’d already fitted with an 8-inch 4:3 screen.
“It’s powered by a Pi 3 and it already had the rotary dial set up and connected to the GPIO,” he explains. “This meant I could mess about with the TV HAT, but still fall back on the original project’s script if needed, with no hardware changes required.”
Change the channel
Indeed, Martin’s main task was to ensure he could switch channels using the rotary dial and this, he says, was easier to achieve than he expected. “When you go to watch a show from the Tvheadend web interface, it downloads an M3U playlist file for you which you can then open in VLC or another media player,” he says.
“At first, I thought the playlist file was specific to the individual TV programme, as the show’s name is embedded in the file, but actually each playlist file is specific to the channel itself, so it meant I could download a set of playlists, one per channel, and store them in a folder to give me a full range of watching options.”
Sticking to his theme, he stored playlists for the four main channels of 1982 (BBC1, BBC2, ITV, and Channel 4) in a folder and renamed them channel1, channel2, channel3, and channel4.
“Next, I created a script with an infinite loop that would look out for any action on the GPIO pin that was wired to the rotary dial,” he continues. “If the script detects that the switch has been moved, then it opens the first playlist file in VLC, full-screen. The next time the switch moves, the script loops around and adds ‘1’ to the playlist name, so that it will open the next one in the folder.”
Martin is now planning the next stage of the project, considering expanding the channel-changing script to include streams from his IP cameras, replacing a rechargeable speaker with a speaker HAT, and looking to make the original volume controls work with the Pi’s audio. “It been really satisfying to get this project working, and there are many possibilities ahead,” he says.
More from The MagPi magazine
The MagPi magazine issue 78 is out today. Buy your copy now from the Raspberry Pi Press store, major newsagents in the UK, or Barnes & Noble, Fry’s, or Micro Center in the US. Or, download your free PDF copy from The MagPi magazine website.
Subscribe now
Subscribe to The MagPi magazine on a monthly, quarterly, or twelve-month basis to save money against newsstand prices!
Twelve-month print subscribers get a free Raspberry Pi 3A+, the perfect Raspberry Pi to try your hand at some of the latest projects covered in The MagPi magazine.
Website: LINK