Be the life of the party with the new Makey Makey DIY Party Pack!
(Guest post by Fraser McKay and Chris Smith)
Maths geeks the world over adopt the 14th March (written as 3.14 with calendars whose format is month-day) as PiDay to celebrate all things Mathsy but specifically the number pi which begins 3.141592653589793…
Chris Smith is renowned for his PiDay antics – it was the topic of his 2015 TEDx Talk: My Life of Pi | Chris Smith | TEDxInverness – YouTube.
In recent years, Chris has roped Fraser Mckay in helping with various pi-related shenanigans by creating videos. For example, in 2020, Fraser used his drone to capture footage of Chris wielding a chainsaw as he hacked a pi-shape in the hedge between his garden and his neighbours’!
PiDay 2020 : Mr Smith tries TOpiARY – YouTube
Thankfully, whenever Chris messages to say “Fraser, I’ve got a new idea for PiDay – you up for helping?”, the answer is an immediate “YES”!
The vision for 2023 was hatched, like every one of these eccentric plans, months before. In fact, we started planning back in July 2022!
Chris had concocted and implemented a tech-free version of this experimental approximation of pi ages ago. But with Fraser’s coding skills, Makey Makey knowhow and 3D printing creativity this project was going to the next level.
For those not in the know, Makey Makey is a fun plug-and-play tool that can turn any conductive material into a computer keyboard. Touching some tinfoil, a banana, or a person, can trigger actions in a computer program, just as if the user had pressed a key. Fraser’s been a Makey Makey ambassador for a few years now, and uses them frequently in his classroom!
We have a giant 18×18 aluminium (tinfoil) grid, stuck to a black plastic sheet. There’s a thin layer of insulation everywhere the x and y axes cross, so the two are only bridged when someone stands on them, and the electricity conducts through their (bare) foot. We released the instructions for the giant Makey Makey coordinates grid a few months before Pi Day, as a ‘drawing’ tool. We kept its true purpose secret!
It was full steam ahead as we embarked on making “Pi Voltage” (pun courtesy of Aimee) a reality but the clock was ticking. We gradually made changes to the software, and the grid, over the next few months…
The Python code, running on a laptop next to the grid, records the coordinates every time someone steps on the grid.
The idea is relatively simple, Mathematically (honest).
The grid is a square. Inside we squeeze a circle neatly so it touches all four edges (we decided not to have this visible on the physical grid in case it influenced the students as they wandered about). Clearly some grid points are in the circle and some are outside the circle. The more steps the more likely we are to fill the entire grid. The circle has a radius of R.
This means that the circle has a area of πR². And since the square has a radius of 2R it must have an area of 4R².
Now, if we multiply the number of steps registered inside the circle by four and then divide this by the number of steps across the entire square then something nifty happens. We’re left with just pi. Well, that’s the theory.
If you’re still not sure what’s going on, don’t worry. Fraser was in the same boat until he watched Chris explain it again in under two minutes in this video!
A while back, we posted this Instructables tutorial, showing how to make a 2x2m Makey Makey enabled coordinate grid. We shared some Python code that let you use it as a drawing tool, but it was our little secret that this was really meant for Pi Day!
To recreate our day, you’ll need:
Link – Makey Makey floor grid ➡ Instructables link
Link – Source code ➡ hosted on Fraser’s Replit page
You can also download the Python files to run locally. In that case, you’ll need the Pygame, Pandas and numpy libraries, as well as Python, installed on your computer.
We both like having classroom ‘props’ for something like this, so we 3D printed some silly ‘warning’ signs and cones, to add to the atmosphere.