top of page

Lesson 3.1

Intro to Computational Thinking & Programming
Established Goals

A basic challenge to get students thinking about simple instructions and sequences, or in coding terms, creating algorithms and loops. Coding challenges are presented as projects where students create games.

An “unplugged” activity is included to get students thinking about how coding requires exact language. Then as students complete the Piper Blink project, they learn how to wire a circuit with an LED and how to make it turn on and off with code.


Note: There are step by step instructions for the students to follow in the tutorials included in each project on Piper. These provide directions both for writing code and for building the electronic circuits. The tutorials are well-defined and most students will be able to follow them with little assistance required.


Lesson Time: 45 to 60 min

Assessment: Summative Assessment 3.1

Learning Objectives
Students Will:


Create quick basic commands for real world problems then link to coding concepts.


Understand computational thinking concepts, including algorithms, sequence of instruction, and loops.


Determine potential solutions to solve simple hardware and software problems using common troubleshooting strategies.


Make observations to provide evidence that energy can be transferred from place to place by light, and electric currents.


Demonstrate how computer hardware and software work together as a system to accomplish tasks. Review these key electronics and programming understandings:

  • wire and pin positions for specific inputs and outputs.

  • electric flow is sensed by the computer hardware (the pin) and programmed to have an effect in software (pin code), and thus on the screen (actions occurring).

  • the computer is programmed (ie block code is written) to detect electricity going into the pin (the pin is on). The program also sends a high voltage to the pin (turn the pin on) when light is desired (a button is pressed).

Lesson Preparation
  • Open a side space in the room for students to move around for first part of the lesson.

  • Create 5 Sample everyday activities for the pairs to complete such as peeling a banana, tying a shoe, opening a door, brushing your teeth, or making a peanut butter and jelly sandwich.

    • OPTIONAL: Simplify this activity for younger learners by just having them coach each other on drawing a square on a piece of paper.

  • Suggested student to kit ratio is 2:1 up to 3:1. Students are in the same teams as before, or make adjustments as necessary to facilitate good teamwork.

  • Make sure Piper kits are built, connected, functioning, and batteries are charged for the Raspberry Pi and the speaker.

  • Retrieve student team storage boxes with Piper build components.

  • Provide storage devices to teams to hold electronics - such as paper plate or paper cup or plastic box.

  • If previous students have completed projects on the Piper, and you want a new student to start from the beginning, in the project area, click the Reset All Projects button on the top left of the Settings screen (yellow button linked off main menu).

  • Prepare to implement Pipercode Journals as a project-based learning grade. Review NGSS Engineering Design journal options for the appropriate grade levels. Options include books designed as Journals, electronic Google or Word docs, student notebooks, or other tools associated with your school’s LMS system. Students will need to create sketches to add to their journal. (You may need assistance in the technology of how they do this with an electronic journal.)  

  • Create a rubric you will use to evaluate their Piper Journals and teamwork (see sample Grading Rubric in Appendix).

Lorem ipsum Lorem ipsum Lorem ipsum 

Lesson Resources:

Activities (60% of class time)

Activity 1 Unplugged Ruby and Robot (15 minutes)


  1. Turn and Talk: Turn to your partner and ask “Do you know what Programming is?”

  2. Pair Share: Allow students to discuss and draw what a program or code looks like (2-3 minutes).

  3. In groups of two, assign one learner to be Ruby “The Programmer” and one to be “The Robot”.

  4. Assign each pair an activity (may be written on a piece of paper pulled from a hat)  

  5. Ask the Programmer to explain to their partner (Robot) how to perform the steps needed to complete their activity using words only (no non-verbal motions like hand movements)!

  6. Switch pairs, so the other person explains.

  7. After the activity, use this as an opportunity to talk about the importance of simple, clear instructions and sequences (if the room is loud, say: “Head Programmer” says, all Rubies stop!”).

  8. Congratulate learners for creating their first algorithms and pseudo code! (Then explain those terms).

(Adapted from Teachers Learning Code Getting Started Guide)

Activity 2 How to create PiperCode (20 minutes)


Tour PiperCode:

  1. Introduce the PiperCode main menu platform and tell students that they will be learning to code the basic functionality of video games and building controls for simple circuits with LEDs, buttons, switches, and breadboards.

  2. Tour of the PiperCode interface:  3.1 SLIDES - Intro Comp Thinking

  3. Open your finished project and demonstrate running code. When you click Start notice:

    • In the project window you’ll see when PiperCode is running each line.

    • If you open the Electronics tab, you’ll also see the pins light up too!

  4. ​Introduce Piper Journals. Explain how students will use them to draw the circuits they build and write out the code they create for each project.  Also provide a copy of rubric you will use to evaluate their Piper Journals and teamwork (see sample Grading Rubric in Appendix).


Activity 3 Complete Blink Project (15 minutes):

  1. Guide students to complete the Blink project steps in their pairs or groups.  

  2. See Piper Quick Guide PiperCode Projects

  3. See Piper Quick Guide Blink Project

  4. During this time, roam around the room, asking the essential questions* of this lesson:​

  • Why are the GPIO pins important to allow the Raspberry Pi to interact with the LEDs as outputs?  What happens if you use the wrong pin number in the code block? Example Answer: The GPIO pins allow the Raspberry Pi to communicate with the outside word such as the LED pins by connecting them with jumper wires. If the code block has the wrong pin number, the Raspberry Pi cannot communicate with the LED.

  • How do you start and stop the code? Example Answer: You start and stop the code by clicking “START” or “STOP” in the top left corner of the screen.

  • Why do we code a loop to make the light blink? (note: delve more into why the Repeat Forever code versus just a one-time sequence). Example Answer: If we do not use a loop, then the light will only blink one time. If we want the light to keep blinking, the code needs to repeat forever until we click “stop”.

    **Teachers: To learn about the “Repeat Forever loop, click here

  • Why does running the code blocks to make the flow of electricity to the LED turn on then off cause a blink? Example Answer: When you click start, the Raspberry Pi sends current (electrical charge) from the pin to the LED. The LED then converts the current into light. **Teachers: Note that you can engage prior knowledge from StoryMode lessons to discuss completing the circuit and LEDs.

  • How do you make the light blink faster, slower or longer or shorter? OR How does changing the number of milliseconds (ms) wait change the behavior of your blink? Example Answer: The number of milliseconds wait changes how long the light stays on before you turns off. This changes the speed of the blink. The shorter the wait, the faster the blink!

*These checks for understanding help reinforce learning of the computer science practices of how computer hardware and software work together as a system to accomplish tasks. (CA 3-5.CS.2 (P4.4))


(10 minutes)

  1. Review vocabulary words and definitions that were encountered during the lesson.

  2. Facilitate: Walk the room and check for understanding by observing breadboard and blink frequency. Complement students on the various code solutions. Ask students to explain what their code is doing and how it relates to the circuit. Provide feedback and praise to each student. If one student in a team is not answering, encourage him/her to provide the answers.



  1. Review core terms and components from Phase 1 and 2 Vocabulary terms, especially BreadBoard, Circuit, GPIO Pins, LED, Switch, and Buttons by playing Piper Pictionary /Charades.

  2. Put the glossary terms on slips of paper and have team pull from a hat, giving them 1 minute to draw it or mime the function and the rest of their team has to guess!

Closing (10 minutes)

  1. Students take a picture of their control panel, circuits, and code. After completing projects, students take apart any circuits on separate breadboards and return parts to their proper bag in the storage bin. Pipers are put away to focus on discussion.

  2. Depending on age of your students and available time, choose one of the Computational Thinking frameworks and introduce the main concepts using slides after “closing” slide 3.1 SLIDES - Intro Comp Thinking

  3. Ask students to reflect which of these ideas and practices they acted out while being Ruby or the Robot.



  1. Choose some sample code to review as a group - do students recognize any patterns? Are there any ways they could simplify their algorithms?

  • Student Guided Discussion/Reflection:* (optional Google doc or form). Combine a few groups together and encourage discussion of the project and new code concepts. Appoint one student as group leader who is to provide a summary of student discussion. Provide guiding questions to start:

    • What do you know?

    • What do you think?

    • How do you know it?

    • How does it relate to a real world engineering problem?

* Circulate classroom and observe students as they apply new concepts and skills. Assesses students' knowledge and/or skills. Look for evidence that students have changed their thinking from before the activity.


  • Have students document the Blink project as a project in their Piper Journal to include: Pseudocode, their block code, and a sketch of the circuit created. They should note any roadblocks and how they troubleshot solutions, or how they might build it differently the next iteration. (Provide examples of what this should look like and explain pseudocode, writing out the block code, and sketching the circuit.)



  • Provide samples of circuit diagram components and circuit diagrams, and have students draw circuit diagrams of the projects built in this lesson in their Piper Journal.

bottom of page