Pi Bash - test your strength!

By Russell Barnes. Posted

When Steve Upton was challenged to have a bash at creating a Hi Striker machine, he hit the ground running and ended up developing two

If you’ve ever been to a fairground and been asked to ‘step right up’ and ‘test your strength’, then you may have found yourself smashing a hammer against a puck in an attempt to ring a bell. These so-called Hi Striker attractions have been popular for close to 100 years, but when Steve Upton based one around an Arduino, he didn’t realise he’d soon have a Pi-based hit on his hands.

The full article can be found in The MagPi 60 and was written by David Crookes.

The idea for building the gaming machine came from a company called AJW Distribution, which had approached the members of Cambridge’s inventing shed, Makespace. The firm wanted something to entice people to its stand at a forthcoming trade show. “They wanted it to look like the side of a building, and use their cladding and roofing material,” says Steve, who agreed to the challenge.

 Steve built a full working version, adding an element at a time

New and improved

Having created the machine, which made lots of cash for charity, Steve decided to play around with his design. “I knew it would be great for Raspberry Pi parties, Jams, and Maker Faires,” he says. “So I just had to create another improved version based on what I’d learnt.” He was going to call it Pi Striker, “but I couldn’t write an ‘r’ with the displays I intended to use for the scoreboard.” Instead, he named the new project Pi Bash and, grabbing a wad of paper, began to draw up his plans.

Steve knew what he needed to create the machine based on his previous experience. He decided to use the small, inexpensive plug-on RasPiO Duino board for sensing and the focused monitoring of speed. He also used a pressure sensor which could detect a hit, a vertical LED strip that would light up according to how hard the impact was, some star-shaped LED strips, and a bell with a relay controller to produce a satisfying ding if the player was successful.

He also wanted a mode selector so that the game could be adjusted to suit the player; a reset button; and the aforementioned scoreboard. “Once I had all of these working individually, I built the wooden support structure and started to add them together,” recalls Steve. “I could then tune the sensing calculations to make it feel as realistic as possible.” There wasn’t much programming involved, although the sensing code, written in C, was fairly complex.

 Ring the bell!

What are the scores?

The scoreboard was tricky to make. Rather than using a screen, Steve wanted to use three large seven-segment LEDs to make the score clear, “but I couldn’t find anything appropriate for sale, so I built one myself.” The seven-segment displays were connected to a laser‑cut Perspex mount which Steve built at Makespace.

“I bought the LEDs online, along with the components to build controllers for them,” he adds, referring to the resistors, shift registers, optocouplers, and connecting wire. “This was one of the more challenging parts of the project.” The lights and sensors also proved tricky to control, so they remain connected to the Arduino at the moment.

More difficult, though, is actually achieving a high score, but the reaction to the Pi Bash has been great. “I’ve got a couple of sensitivity settings so parents and youngsters can compete on a more equal footing. We had a lot of laughs at the Pi Birthday Party earlier this year.”

From The MagPi store

Subscribe

Subscribe to the newsletter

Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.