Primes In A Box

Lots of useful things come in boxes. Shoes, soldering irons and… prime numbers? This simple project from [WhiskyTangoHotel] puts a list of prime numbers in a handy box. Press a button, get a prime.

Sure, it isn’t brain surgery: all that it is happening is that a Raspberry Pi is reading a number from a text file, then showing it on an LCD screen. But it’s well-documented project that shows how to tie together a number of things on the Pi, like writing to an I2C display and using a button to trigger a clean shutdown.

It might be a good starting project for the younger hacker or if you have a Pi pining for something to do. If you’re looking for more easy Raspberry Pi projects, check out our Enlightened Pi Contest.

6 thoughts on “Primes In A Box

  1. you cannot get a prime from the number Pi (3.1416), but you can from a raspberry Pi (computer), however there still is no real formula for primes, it is really – pretty much trial and error. Test each number sequentially =1,2,3,4,5,6,7…101,102,103… to infinity.

    1. I have used stored primes for various endeavors before, but I wonder if a pi would have the power to generate primes on the fly, say, starting with 6n+/-1 values and going until a prime is found. Somehow the beautiful delay at times would seem to add to the mystery.

  2. The RasPI can, of course, gen the primes on the fly. However the time to find the next prime starts to get a bit long after testing values of 100, 000 or so. Easy to test to see if it would fit your needs by just putting a simple python script into the RasPI and letting it run.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s