a1tD00000088737IAA

Course: Engineering Design with LittleBits Code Kit
3) Logic

  • 6-12 grade
  • Beginner

Lesson Description:

Students learn about logic blocks and then apply it to their code to…

  1. Create a program that uses logic blocks to have the LED Matrix display one image when no inputs are on, and a different image when 2 inputs are on.
  2. Create a program that has the LED Matrix display at least 3 different images for 3 different levels of inputs.
  3. Create your own goal using logic blocks and program the LED Matrix to reach that goal.

image description

Lesson Modules


Teaching Tips:

This lesson will take about 2 hours to complete. You may have to split the lesson into multiple classes.

Many of the activities in these lessons exist in the tutorial section of the LittleBits Code Kit App. These tutorials show the students EXACTLY how to set up their code. If students do this then they are not problem solving and learning how to program. Try to reduce the risk of students using the tutorial page to build their program.  You can tell if the students are using the tutorials or not by looking at the top left of their screen. If it says “Blank Canvas” they are most likely doing it themselves. If it says anything else, it is likely they are using the tutorial.

If this is what is shown on the top left of the students' screen then they are making their own project.If there is any other name in the upper left hand of the students' screens then they are using a tutorial and are likely not creating their own project.




Materials:

·         One LittleBits Code kit per group (suggestion: 2-3 students per group)

·         One computer for each student group

·         Teacher computer

·         Internet connection

·         Projector

 

Preparation: none

 

Observation activity:

Have students go to their computers and answer the following questions.


1) Imagine someone knocks on your door. When you open the door you see your best friend. What is the first thing you do?

2) Imagine someone knocks on your door. When you open the door you see your neighbor. What is the first thing you do?

3) Imagine someone knocks on your door. When you open the door you see a stranger. What is the first thing you do?


Once all of the students have submitted their responses facilitate a conversation about their responses.


Facilitate a discussion with your students: Why do you respond differently to these scenarios?



In this section we will begin ou exploration of the use of logic in programming.


Imagine someone knocks on your door. When you open the door you see your best friend. What is the first thing you do?


Imagine someone knocks on your door. When you open the door you see your neighbor. What is the first thing you do?


Imagine someone knocks on your door. When you open the door you see a stranger. What is the first thing you do?


Teaching Tips:

1)      Show the students’ goals on the class view.

2)      Let them know that today we are going to begin learning about logic blocks, and the next class we will learn even more complex ways to use logic.

3)      Show the logic blocks on the class view. Have the students discuss what they think each block does.

4)      Show the descriptions of the logic blocks on the class view.  Have the students discuss what they think each block does.

5)      Then show them the descriptions of each code on the class view. Have the students think of as many examples as they can of when/why a programmer would use each type of logic block. (ex: if they want the output to respond to many variations of input)

6)      Show the students the “Code Kit Tutorial 4: Logic” video on the class view

7)      On the class view, show the next image of the 2 logic blocks:  if do else and if else.  

8)      Tell the students that today we are going to focus on 2 blocks: if do else and if else.  

9)      Show the next activity on the class view. Have the students use these 2 blocks to think back to the observation activity (people coming to your front door). Have them write the “code” their brain does to make decisions using these blocks.

Ex: If…the person who knocks on my door is someone I know

Do: let them in

Else: do not let them in

10)   Show the students the “Flocabulary Coding: Conditionals” video

11) In order for students to use the logic blocks, they need to use input/output blocks. Show the students the next section of the class view (logic blocks, input/output blocks and codebit) and facilitate a discussion about  how to use these blocks together. (Example answer: the logic blocks are conditional statements – the input/output blocks  are the input for the conditional statements)


In this section we will be learning about logic blocks work. 


Teaching Tips:

GOAL 1

Show the students’ first goal on the class view: Create a program that uses logic blocks to have the LED Matrix display one image when no inputs are on, and a different image when 2 inputs are on.

During the design time, walk around and prompt your students with questions to help deepen their learning and thinking process. Some examples of questions are:

  • Why did you make that design decision?
  • What do you predict your code will do?

Here is an example of a working code for this goal:




GOAL 2

In order to reach the 2nd goal, students need to learn about converting levels of input into numbers. To help them understand it, they are going to do an activity where they decide what they would wear (clothing) depending on the weather report. (on the class view). Ex: if the weather report was rain, I would wear  galoshes, raincoat, and bring an umbrella.

The class view will bring you through the series of activities to teach students the essential skills to be successful on the next goal.

q: Using this code: How many possible outputs are there?

a: 3: the possible outcomes are 1, 2, 3


Show the students’ second goal on the class view: Create a program that has the LED Matrix display at least 3 different images for 3 different levels of inputs.

During the design time, walk around and prompt your students with questions to help deepen their learning and thinking process. Some examples of questions are:

  • Why did you make that design decision?
  • What do you predict your code will do?

Here is an example of a working code for this goal:





GOAL 3


Present the challenge goal on the class view: Create your own goal using logic blocks and program the LED Matrix to reach that goal.


Have students submit their goals as a response to a question on the student view.

Once the students have submitted their goals, have students share them with the class. 

During the design time, walk around and prompt your students with questions to help deepen their learning and thinking process. Some examples of questions are:

  • Why did you make that design decision?
  • What do you predict your code will do?

In this section we will practie using logic blocks in our progams. 



LittleBits Blockly Key



Little Bits Code Kit Reference



Create your own goal using logic blocks and program the LED Matrix to reach that goal.




Teaching Tips:

Have students answer the following questions on their computers.

Once all the students have finished answering the questions have a class discussion about their answers.

  1. Explain how logic blocks work.
  2. What was the most challenging part of using logic blocks? What strategies did you use to overcome this challenge?
  3. What is the coolest thing about coding with logic blocks? Explain why.

In this section we will reflect on our learning of usin logic in our programming. 



Explain how logic blocks work.


What was the most challenging part of using logic blocks? What strategies did you use to overcome this challenge?


What is the coolest thing about coding with logic blocks? Explain why.