Data Sheet
42 : circuit 2b
NEW COMPONENTS
BUTTONS: Also known as momentary
switches, buttons only remain in their ON
state as long as they’re being actuated,
or pressed. Most often
momentary switches are
best used for intermittent
user-input cases: reset
button and keypad buttons.
These switches have a nice, tactile, “clicky”
feedback when you press them.
Note that the different colors are just
aesthetic. All of the buttons included
behave the same, no matter their color.
NEW CONCEPTS
BINARY NUMBER SYSTEM: Number
systems are the methods we use to
represent numbers. We’re most used to
operating within the comfy confines of
a base-10 number system, but there are
many others. The base-2 system, otherwise
known as binary, is common when
dealing with computers and electronics.
Computers, at their lowest level, really only
have two ways to represent the state of
anything: 1 or 0, which can also be thought
of as ON or OFF, TRUE or FALSE, HIGH or
LOW. Almost all electronics rely on a base-2
number system to store and manipulate
numbers. The heavy reliance electronics
places on binary numbers means it’s
important to know how the base-2 number
system works.
DIGITAL INPUT: In circuit 1A, you
worked with digital outputs. Each of the
14 digital pins can also be digital inputs.
Digital inputs only care if something is in
one of two states, 0 or 1. Digital inputs are
great for determining if a button has been
pressed or if a switch has been flipped.
PULL-UP RESISTORS: A pull-up
resistor is a small circuit that holds the
voltage HIGH (5V) on a pin until a button is
pressed, pulling the voltage LOW (0V). The
most common place you will see a pull-up
resistor is when working with buttons. A
pull-up resistor keeps the button in one
state until it is pressed. The RedBoard has
built-in pull-up resistors, but they can also
be added to a circuit externally. This circuit
uses the internal pull-up resistors, covered
in more detail in the Code to Note section.
Circuit 2B: Digital
Trumpet
Learn about digital inputs and buttons
as you build your own digital trumpet!
Buttons are all around us, from the keys
on your keyboard to the buttons on your
remote control.
YOU
NEED
POTENTIOMETER PIEZO BUZZER 10 JUMPER WIRES 3 PUSH BUTTONS