Learn to build buttons that will translate numbers to binary.
In this project, students will explore binary code, a foundational part of computing. Students will try to “speak” a few numbers in machine language, just as computers do.
Students will build two tactile buttons and use functions to convert from binary to decimal numbers.
Students will understand what lists do in code and how they are used to store a collection of information in an organized way.
Students will understand how binary has been used throughout the history of computing and why almost all computer systems are based on binary.
I WILL BE ABLE TO...
Build a two-button translator to convert binary to decimal!
Understand why almost all computer systems are based on binary
Learning Activities
ELA Extension: Robot Miscommunication Comic
Pair students up or allow them to work independently based on writing and drawing preferences. Students will write and illustrate a comic or short story that shows what happens when a robot follows commands too literally—leading to unexpected or hilarious results.
Begin by brainstorming a funny or chaotic scenario in which a robot misunderstands a command. Examples: “Piperbot was told to ‘go bananas’ and started launching fruit across the room.”
Have students develop their story using clear cause-and-effect structure:
Who gave the command?
What did the robot do (literally)?
What was the outcome?
Students will write and illustrate their story using dialogue bubbles, narration boxes, and sequencing words such as: first, then, next, finally.
Encourage them to highlight how miscommunication between humans and robots can lead to silly or surprising consequences. Stories may be one full comic strip, a three-panel cartoon, or a written narrative with spot illustrations.
Bonus vocabulary words to include: command, sequence, robot, input, output, literal
EXTENSION: Students write an alternate version of the story where the human gives a clearer command and the robot responds correctly.
Have students present both versions side by side and reflect on how clarity changes outcomes.
ELD Extension: Command & Sequence Practice
Pair students so that each English Learner (EL) is working with a fluent or higher-level EL. Students will develop listening, speaking, and sequencing skills through guided physical movement and structured oral practice.
Begin by introducing simple command words with visuals and gestures: stand, sit, turn, stop, go, clap, spin, wave Practice each word using call-and-response and teacher modeling.
In pairs, students take turns playing the “programmer” and the “robot.” The programmer gives a sequence of 2–5 commands (e.g., “Clap twice, then turn left.”) The robot must follow the commands exactly—no improvising or guessing!
After each round, students switch roles and then retell what happened using sentence frames:
“My partner told me to __, then __.”
“The robot __ when I said __.”
Wrap up with a class reflection:
What made the instructions easy or confusing?
What happened when the robot didn’t follow the command exactly?
Use sentence frames to support oral responses:
“The robot __ when it heard __.”
“I gave the command __, and the robot __.”
“First we __. Then we __.”
Math Extension: Step-by-Step Algorithms
Pair students together or allow them to work independently based on task complexity and math readiness. Students will identify and write clear, step-by-step instructions (algorithms) to complete a simple task, exploring the role of order and logic in solving real-world problems.
Begin with a Step-by-Step Task. Choose a simple activity such as:
Making a peanut butter sandwich (or a paper version)
Walking to the pencil sharpener
Drawing a face or shape (e.g., triangle, square)
Students will write an algorithm using numbered steps. Example: “Step 1: Pick up the pencil. Step 2: Draw a circle.” Emphasize clarity, order, and logic—like giving instructions to a robot.
Students then test and debug by trading instructions with a partner who acts as the “robot.” The “robot” must follow the steps exactly—no guessing! If the task doesn’t work as expected, students revise their instructions to correct or clarify.
After testing, students reflect on the process using prompts such as:
“What did I need to fix in my algorithm?”
“How did the order of steps affect the outcome?”
“Where did my logic break down?”
EXTENSION CHALLENGE: Introduce if/then logic to handle conditional steps (e.g., “If the cap is on, then remove it”).
Add loop or repeat commands for actions that occur more than once (e.g., “Repeat 3 times: draw a line.”)
Have an different version? Look for more information on the Support Page.
Troubleshooting Tips
Are you not receiving any inputs from the button presses?
Ensure that you’ve plugged the wires into the right GPIO. Look at the Digital View to see which pin you’re affecting.
What is binary?
Binary describes a numbering scheme with only two possible values for each digit – 0 or 1 –. It is the basis for all binary code used in computing systems
Our customer support specialists are on hand to ensure your implementation of Piper runs seamlessly. View Support Docs or Contact Support
EXPANDED RESOURCES
Term Glossary
Circuit A conductive path for the flow of current or electricity.
Power The current or flow of electric charge and voltage.
Microcontroller An integrated circuit containing a microprocessor with memory and associated circuits.
Variables A value that can change depending on conditions or information passed to the program. A storage location with a symbolic name used to keep track of a value that can change while a program is running (similar concept to using X and Y in an algebraic equation). Variables are not only numbers; they can also hold text, including whole sentences (strings) or logical values (true or false).
Input Device A hardware device that sends data to a computer, allowing interaction and control.
Output Device A piece of hardware that converts information into a form humans can sense and understand.