Lesson 10. Automating Circuits - Introduction to Simple Coding

Melissa Beemsterboer
Physics
30 minutes
High School Honors Physics
v1

Overview

In this lesson students will start describing what they know in computer programming terms in order to see how to port over to the realm of coding their circuits. They will describe a set of "rules" for something just as in coded language the code is a set of "rules" for the computer program to follow. They will also need to realize they can't miss a step, even if it seems obvious to them!

 

In Lesson 2, you will be asking students to talk you through the steps of something very simple, like making a peanut butter sandwich. They will likely skip steps, so be sure to follow their directions EXACTLY. If they say "First put the peanut butter on the bread", literally take the jar of peanut butter and put it on top of the loaf of bread.

Standards

Next Generation Science Standards
  • Engineering, Technology, Applications of Science
  • Physical Science
  • NGSS Crosscutting Concept
    • Systems
    • Energy
  • NGSS Practice
    • Analyzing Data
    • Constructing Explanations, Designing Solutions
    • Using Models
    • Using Mathematics
    • Conducting Investigations
Computational Thinking in STEM
  • Data Practices
    • Analyzing Data
    • Collecting Data
    • Visualizing Data
  • Modeling and Simulation Practices
    • Assessing Computational Models
    • Constructing Computational Models
  • Computational Problem Solving Practices
    • Computer Programming
    • Troubleshooting and Debugging

Credits

Unit designed by Melissa Beemsterboer a teacher at Lindblom.

Activities

  • 1. Working with Devices
  • 2. Simple Procedures
  • 3. Instructing Computers with Scratch
  • 4. Computer Programming Lingo

Student Directions and Resources


In this lesson you will start to learn the language of coding. You will need to understand how to communicate a set of "rules" for a computer to follow. Then you will need to familiarize yourself with specific coding terms to help you communicate in the language.

1. Working with Devices


We've all experienced it. You wake up, you roll over and click the button to wake up your phone to check to see if you have any notifications and.....

YOUR SCREEN IS BLACK!

What do you do? It's 6:30 am and you have to get to school by 8. Write out a list of things you might do. (We might all do the same first step, but what if that doesn't work? Keep asking yourself "What if that doesn't work?")


Question 1.1

What were your steps? List them out in order here.



Question 1.2

Have you ever asked Siri, Alexa, or your Google Home to do something and it responded, "I'm sorry, I don't understand?" What was your question and how did you rephrase it to get the answer you wanted?



Question 1.3

Why do you think that Siri, Alexa, or your Google Home sometimes responds, "I don't understand?" What does this mean in terms of the way these devices were programed?



2. Simple Procedures


You and your classmates will be giving your teacher instructions in a moment. Wait for your teacher to ask for your help, then participate in the class activity.


Question 2.1

How is this activity useful for both coders and scientists?



Question 2.2

How is the "procedure" you would write for a computer different than a procedure a scientist would write?



3. Instructing Computers with Scratch


There are many computer coding languages that help us figure out how to instruct computers to do things for us. Instructing computers to do things for us is often referred to as "coding." Today, you will be "coding" with Scratch.

  1. Go to the scratch website (scratch.mit.edu)
  2. Click "Try it out" at the top. It's the green circle with the cat.
  3. On the right, a tutorial will appear. Click through the steps of the tutorial to learn where to find certain commands. Remember, now you are operating in the computer's language, so you need to learn that language and the tutorial will help you do that.
  4. Once you've clicked through and performed all the steps of the tutorial, share your project with your teacher!

4. Computer Programming Lingo


Think about the programmers who wrote the code for the PHeT simulation you used to learn about circuits. There is a picture below in case you need a reminder.

Try to write a set of steps that a computer might follow to build this circuit and get it to light. Make sure your set of steps also instructs the computer how to behave with a switch in the circuit.

As a bonus, think about any words you have heard that are related to logic or computer programming, and try to work those in. Look back at your list of scratch commands and use these!

Hint: Pretend the electrons are "sprites" (like the cat)!


Question 4.1

List out your instructions for the computer below!