to press firmly but not too hard—otherwise, you’ll bend the connectors, and
they won’t fit. It’s usually easier to plug in parts after you’ve shortened the
connectors. When cutting the connectors, wear safety glasses to protect your
eyes!
While fiddling around with the parts, don’t forget that some of them—LEDs,
for example—need a certain direction. Pushbuttons are candidates for
potential problems, too. Take a close look at the pushbuttons on page 48 and
make sure that you’ve mounted them in the right direction.
Even simple things, such as ordinary wires, can lead to problems, especially
if they aren’t the right length. If a wire is too short and might potentially slip
out of its socket, replace it immediately. Wires are too cheap to waste your
valuable time with unnecessary and annoying debugging sessions.
It might be—although it’s rare—that you actually have a damaged LED. If
none of the tricks mentioned helps, try another LED.
Exercises
• Binary dice are all very well when you’re playing Monopoly with your geeky
friends, but most people prefer more familiar dice. Try turning binary dice
into decimal dice with seven LEDs. Arrange the LEDs like the eyes on
regular dice.
• The 1kΩ resistors we used to protect our LEDs in this chapter are rather
big. Read Resistors, on page 241, and replace them with smaller ones, for
example 470Ω. Can you see the difference in brightness?
• LEDs can be used for more than displaying binary dice results. Provided
you have enough LEDs, you can easily build other things, such as a
binary clock.
3
You already know enough about electronics and Arduino
programming to build your own binary clock. Try it or think about other
things you could display using a few LEDs.
3.
http://www.instructables.com/id/My-Arduino-Binary-Clock/
Chapter 3. Building Binary Dice • 60
report erratum • discuss
www.it-ebooks.info