Author:
Kim Wilkens
Subject:
Computer Science, Computing Systems
Material Type:
Unit of Study
Level:
Upper Primary, Middle School
Tags:
CS, Computer Science, VA
License:
Creative Commons Attribution Non-Commercial Share Alike
Language:
English
Media Formats:
Downloadable docs, Video

Education Standards

Events in Scratch

Events in Scratch

Overview

Events in computer science are the triggers for making action happen, like selecting the play button on any screen. Events in Scratch are represented by the yellow codes including: when flag clicked, when sprite clicked, when key pressed and broadcast. Broadcasting is the most advanced event in Scratch and helps with interactions between sprites like pacing their conversations or changing levels.

Overview

CS concepts covered

 sequencing, programming, storyboarding, debugging, events, terminology, conditions

What students will do

  • They will work with their peers to figure out the events in the CS unplugged activity

  • They will practice using Events in Scratch

  • They will create a storyboard to plan for a cross-curricular project 

  • They will program their storyboard and bring it to life with event code

What students will figure out

  • Different ways to use events to trigger action on the screen

  • That the sequence of events is important

  • That they can demonstrate their learning in another subject area by creating tech

CS Integration Extensions

One of the most exciting things about learning a CS concept like events in a tool like Scratch is the possibility for students to use their newfound skill to share their learning in another subject. The possibilities are endless, but here are a few CS integration projects your students will be ready to do after this lesson:

Lesson at a Glance

Part

Duration

Lesson Summary

Materials

1

15-30 min

CS Unplugged: Events Unplugged

Students “act out” the coded events provided.

4 envelopes with printed instructions inside

2

30-45  min

Events in Scratch

Students recreate the Part 1 unplugged activity in Scratch to reinforce events concepts.

Scratch can be used online or downloaded.

 

If you are using online, your students will need accounts to save their project. You can create an educator account and set up class(es) for your students to join.

 

Materials 

per student/pair

per group

per class

  • Scratch downloaded or student accounts created for online access through an educator account

  • Tablet/computer

  • scrap of paper

  • Instructions for 4 characters from Character sheet

  • 4 envelopes

  • Computer display

 

 

Materials preparation 

Part 1

  • Print out instructions for 4 characters from the Character Sheet and cut out each instruction

  • Place instructions into 4 different envelopes

    • Write PURPLE on one envelope and put character 1’s instructions inside

    • Write ORANGE on another envelope and put character 2’s instructions inside

    • Write GREEN on another envelope and put character 3’s instructions inside

    • Put character 4’s instructions in final envelope

Part 2

  • Make sure Scratch is either installed or you/your students create accounts through an educator account in order for students to be able to save their work. For this lesson, saving is not necessary, but for future projects, you will want students to be able to save their work. Watch Scratch Desktop vs. Online video for more information.

CS Unplugged - Events

 

 

Objectives

  • Learn that events are triggers to make an action happen

  • Begin to think abstractly about what computers are doing with the code we put into them.

Vocabulary

  • Events - triggers that make action happen in coding, like turning a light on and off

  • Sequence - the order in which the code runs

  • Program - a list of commands to solve a problem

Materials:

  • 4 envelopes with each character’s instruction 

Introduction

CS unplugged activities are a great way to introduce a concept by helping students either get hands-on with it or see it from a different perspective. In this CS activity, you and your students will “act out” the coded events provided.

 

Introduce students to the concept and use of events. 

  • Ask students to share what they already know about events from their everyday experiences.

  • Have students explain what they think “events” mean.

  • Ask students to think about how we can give instructions to computers. 

 

Activity

Introduce students to the activity. Tell students that the purpose of the activity is for the class to try to figure out what the code the “characters” are running and what is the trigger to make them run it. 

 

Ask for 4 volunteers. Have them stand up in a line front of class and give them the envelopes in order from character 1 to 4. Ask them to open their envelopes and read the instructions silently. Confirm they understand their instructions. Position character 4 so she/he can see the writing on the envelopes. 

 

Before you start the exercise, ask the rest of the students to watch silently and see if they can figure out the code in the envelopes. Then start tapping character 1, 2 and 3s head, in any order allowing time for each student to “run” their code.

 

After a few minutes, see if anyone in the class has figured out the code being broadcast to character 4. Keep going until the class figures out all the code being broadcast.

 

Discussion:

  • What was the trigger for each event? (answer: tapping their heads)

  • How come they didn’t need to use any spoken words to communicate?

  • What are some examples of “events” that trigger action in the real world? (for example, school bells, traffic lights, seat belt sign on airplane)

  • What are some ways you can think of using events in Scratch?  (for example, timing a conversation, starting a scene, creating, making a character do an action like move, talk, disappear, creating multiple levels, etc.)

 

Explore Events in Scratch

 

 

Objectives

  • Learn how to use the Broadcast event code to make a sprite do specific actions

Materials you will need:

  • Access to Scratch

 

Activity

Introduce students to the activity. Tell students that they are going to recreate what they did in the unplugged activity in Scratch. Events in Scratch  are represented by yellow code and include: the green flag, clicking on character, bump code and broadcast. Broadcasting in Scratch helps with interactions between sprites like pacing their conversations.

 

Watch a video as a class (https://www.youtube.com/watch?v=TP9fF6qkB0A&feature=youtu.be)

or demo how Broadcast events are handled in Scratch

 

Tell students to pick 4 sprites and 1 background for a scene in Scratch. They are going to try to recreate the unplugged activity by having 3 characters broadcast messages that cause the 4th character to do specific actions. You may need to make the instructions in the envelopes from Part 1 visible to the whole classroom.

 

Challenge activities

If a student finishes early, check their work and if they are ready, give them one or more of the challenges:

  • Help a classmate who is stuck on a bug. Helpers don’t touch other people’s devices, but instead offer suggestions for how they might go about debugging.

  • Use the broadcast event to trigger a background change

  • Use broadcast event to create a new level, switching out sprites that show up between level 1 and level 2