How to measure pi with Raspberry Pi

Apparently, some people celebrate Pi Day by measuring pi with random objects. This was news to me when I stumbled across this fantastic post by Jim Hall, who had a go for this year’s Pi Day using a Raspberry Pi 3 Model B. Here’s the story of how Jim measured pi using a Raspberry Pi.

A pencil, some paper, and a Pi

All you need is graph paper, a ruler, a pen, and one of our tiny computers. This is very much a visual gag, so if you’re still confused, let me illustrate for you with words. Our boards have mounting holes, which you can see below: they’re the four holes, one in each corner, bordered in yellow. Jim has secured his Raspberry Pi to a piece of graph paper with a drawing pin through one of those holes. Sticking a pencil through another hole lets him swivel the board around on the paper, drawing a perfect circle.

measure pi with raspberry pi

As most people learned at school and subsequently dismissed from their memory in favour of more everyday facts like how to fold a fitted sheet, the value of pi is the ratio of the circumference of a circle to its diameter. So, now we’ve drawn our circle, we can measure its circumference and diameter and use them to calculate pi.

Smaller and smaller segments

However, it’s tricky to measure all the way around a circle, so Jim starts by drawing straight lines to divide it into smaller and smaller segments. We’ll end up with one that has bit of circle circumference that’s short enough to measure approximately as if it were a straight line. Using graph paper makes it easy to divide the circle into halves, quarters, and eighths. After that, some careful work with a ruler comes into play.

measure pi with raspberry pi
Lines and lines and lines and lines

The smallest wedge Jim was able to draw reasonably precisely was 1/128 of the circle. From there, he measured the segment’s 1/128 of the circumference as if it were a straight line: not perfectly accurate, but good enough for our purposes. He then multiplied this measurement by 128 to estimate the whole circumference, and measured the diameter easily along one of the lines through the circle’s centre. Divide the circumference by the diameter and you get your very own approximation of pi.

If this all sounds a bit too confusing to even attempt, don’t be deterred! Jim has written a step-by-step guide, making this maths challenge super accessible. There are only four steps. Give it go!

Print Friendly, PDF & Email

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Server Status

Aradippou Chat 1 Chat 2 Larnaca Limassol Nicosia

Chat Links

Official Links.

1. Chat 1.
2. Chat 2.

Alternative Mirror Links.

1. KiwiIRC 1.
2. KiwiIRC 2.

Other Web Clients.

1. IrcCloud.

Recent Posts

Related Posts:

Advertisement

Archives

Super Club Radio

Mighty Deals

CyIRC

CyIRC Tweets

Scroll Up
Fatal error: Uncaught WMAC\JSMin_UnterminatedStringException: WMAC\JSMin: Unterminated String at byte 1180: "+o.accessToken}}).then(e=>{if(!e.ok)throw e;return e});return a.catch(e=>{console.error(`Failed to logout chatrix session. deviceId: ${o.deviceId}`)}),a}})(); in /home/bszucbfe/public_html/wp-content/plugins/clearfy/components/minify-and-combine/includes/classes/ext/php/jsmin.php:215 Stack trace: #0 /home/bszucbfe/public_html/wp-content/plugins/clearfy/components/minify-and-combine/includes/classes/ext/php/jsmin.php(157): WMAC\JSMin->action(2) #1 /home/bszucbfe/public_html/wp-content/plugins/clearfy/components/minify-and-combine/includes/classes/ext/php/jsmin.php(96): WMAC\JSMin->min() #2 /home/bszucbfe/public_html/wp-content/plugins/clearfy/components/minify-and-combine/includes/classes/class-main.php(375): WMAC\JSMin::minify('(function(){"us...') #3 /home/bszucbfe/public_html/wp-includes/class-wp-hook.php(310): WMAC_PluginMain->jsSnippetcacher('(function(){"us...', '/home/bszucbfe/...') #4 /home/bszucbfe/public_h in /home/bszucbfe/public_html/wp-content/plugins/clearfy/components/minify-and-combine/includes/classes/ext/php/jsmin.php on line 215