Arduino-based Sieve Of Eratosthenes


[Darkmoonsinger’s] sister is finishing her graduate degree in mathematics, and [Darkmoonsinger] wanted to give her a gift that fit with her achievement. Naturally, building a Sieve of Eratosthenes using an LED matrix and an Arduino made perfect sense. If you’re unfamiliar, a Sieve of Eratosthenes is a simple, but very efficient, technique for finding prime numbers. Starting with a group of numbers, you step through each one in order. If it’s prime, you eliminate any multiples from the list. After a few iterations, the numbers remaining are all primes. After getting the LED matrix and sieve algorithm running, [Darkmoonsinger] designed an enclosure for the project. She made a couple of mistakes with this part, and happily included them for everyone’s benefit.

It only figures primes up to 64, and she lights the LED for 1 because it ‘makes the array look prettier’. Also, we couldn’t help but think that mounting the components a bit differently would have made a cleaner install (here’s a prime number generator with a backlit faceplate). However, that probably doesn’t matter to his sister. As they say, it’s the thought that counts, and we never get tired of seeing people build rather than buy!