O'Reilly logo

Raspberry Pi For Dummies by Mike Cook, Sean McManus

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Choosing an LED

A totally bewildering number of different types of LEDs are available in all sorts of shapes and sizes. For this project, you require LEDs with leads known as the through-hole mounting type. The two main sizes are 5mm or 3mm. The size is not too important here. LEDs also come in two main types of plastic covering, colored or clear, and also two surface treatments, diffused or water clear. For the project you are about to make, you need the colored cover and preferably the diffused type.

One thing you have to look out for when looking for LEDs to be driven directly from the Raspberry Pi is the forward voltage. You have only 3V3 coming out of the GPIO pins, so you want an LED with a forward voltage of no more than 3V. Some older types of blue LEDs are a bit above this and won’t work.

The other thing to look at is how bright the LED is when a certain amount of current is flowing through it. This is normally quoted in the data sheets in the units of candelas or more, usually mille- or microcandela. Knowing the LED’s brightness is useful here because Copycat gameplay requires the player to look directly at an LED and you don’t want it to be too bright. However, you can always cut down on the brightness by reducing the current through the LED. For this project, go for those of about 1 millecandela (mCd).

tip.eps The websites of big distributors such as Farnell in the U.K., known ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required