(Francais) D2: Events - Event Handlers with Dash and Dot
Description Level D, Lesson 2: Students will write a program using event handlers with both Dash and Dot. They will use Blockly preset programs and Challenge Cards to practice their new skills. Object
Educational Standards
CTSA
ISTE
NGSS
Common Core
Wrap Up
Student Presentations
- Have student groups take turns sharing one of their programs with the class. Encourage them to:
- Explain their design thinking (e.g., "We added an event for Dot because we wanted Dot to make fun sounds when moved.")
- Share any obstacles and difficulties they overcame during the activity (e.g., "We had trouble getting Dash to Hear Clapbecause the classroom was so loud, so we asked the teacher for permission to run our program in the hall").
- Encourage students to ask each other how they accomplished different objectives and give each other feedback on their programs. Possible questions/feedback includes:
- "How did you (change the wheel speed)?"
- "I like how you (used a lot of events for Dot's dance.)."
Follow-Up Questions/Discussion
- How did events help you with your program? (Sample response: "Events told Dash to dance when Dot was nearby.")
Assessment
- Use our Evaluation Rubric to review students' work and presentations.
- [Optional] Share your students' work with the world using @logicsacademy and #dashanddot!
Independent Practice
Instructions
Have students work on the following activities in small groups (ideally 2-3 students per robot).
Encourage students to share tablet and robot time. Have them establish and rotate through roles such as:
- Lead Programmer: Holds the tablet and manipulates the code.
- Robot Wrangler: Retrieves and resets the robot after every program attempt.
- Documentarian: Records group results, thoughts, and progress. Illustrates group designs and ideas.
When students work together while coding, they're able to help each other identify mistakes and develop creative solutions!
Dance with Dash Extension
- Have students use the Wonder Journal: Dash Planning, Dot Planning, and/or General Planning worksheet to design ways to add to or alter the Dance with Dash preset program. They can:
- Change the sequence.
- Add event handlers for Dash and/or Dot.
- Change the wheel speed and movements.
- Change the cues.
- After they finish revising the program, have students:
- Complete a Wonder Journal: Reflection worksheet.
- Take a screenshot of their Blockly code.
- Take a video of Dash while the code is running.
Challenge Cards [Optional]
- You can purchase our Learn to Code Challenge Card sets and Curriculum Guide here: https://logicsacademy.com/store/
- Have students complete the following Challenge Cards:
- D 2.1: Follow the Coach
- D 2.2: Training Day
- D 2.3: The Big Event
- For each challenge, encourage students to:
- Use the Wonder Journal: Dash Planning, Dot Planning, and/or General Planning worksheet to discuss how they can complete the challenge.
- Review the Troubleshooting and Problem Solving & Debugging worksheets if they run into any problems with their code.
- After they finish each challenge, have students:
- Complete a Wonder Journal: Reflection worksheet.
- Take a screenshot of their Blockly code.
- Take a video of Dash and Dot while the code is running.
- Update their Challenge Card Checklists.
Guided Practice
Activity: Dance with Dash
- Project your tablet screen, open the Blockly app, and go to the menu at the top left of the screen.
- Go to the Create New Project menu and select the Dance with Dash preset program. Then tap "create."

- Say, "Dash loves to dance! Dash does a fun dance in this program."
- Ask the students to look at the program and predict what they think will happen when it is run.
- Run the program to see if the students' predictions were correct.
- Say, "Dash is a great dancer but doesn't like dancing alone. Let's use an event handler that tells Dash to begin dancing when Dash Sees Dot."
- Ask, "How could we change our program so that Dash only dances if Dot is close by?" (Sample response: "Change the event in the event handler from Hear Clap to Dash Sees Dot.")
- Note: Before running the program again, make sure both Dash and Dot are connected to the app.
- Say, "Dash is much happier now, but Dot wants to dance too! Let's use event handlers to help Dot join in the fun!"
- Ask, "What event handler could we use to help Dot dance?" (Sample response: "We could add an event handler that tells Dot to say 'Wee!' when shaken.")
- Tap on a Set Wheel Speed block and show students how they can change Dash’s spin moves by changing the speed and direction of the left and right wheels.
- For example, students can have the left wheel spin forward very slow and have the right wheel spin forward very fast.
- Have student volunteers take turns changing the settings in the Set Wheel Speed blocks and play the program after each change. Have students share their observations on how Dash’s movement changes.
- Point out the Stop Wheels block and explain that the Set Wheel Speed block settings will keep going until you change the direction of the wheels or when you use the Stop Wheels block.
Quick Check
- What is an event? (Sample response: "Events tell your computer to constantly look for a specific behavior or cue.")
- How did you get Dash and Dot to interact? (Sample response: "Dash interacted with Dot when we used the cue Dash Sees Dot.")
- How do you stop Dash's wheels? (Sample response: "You must add a Stop Wheels block.")
Instruction
Introduction
- Say, "We will be doing another activity with event handlers. In this activity, we will use event handlers to make Dash and Dot interact with one another."
- Ask, "What did you learn about event handlers in previous lessons?" (Sample response: "Event handlers allow computers to constantly be on the lookout for a particular action. When the specific action is completed, the computer follows the instructions the programmer has assigned.")
- Say, "Event handlers are used in real life in many ways." Provide a real-life example of event handlers:
- Say, “Think about a stop sign. When we drive, we are constantly on the lookout for stop signs. Every time we see one, we immediately stop.”
- Say, “Can you think of another event handler from real life?” (Sample response: “Each time the bell rings for recess, we stop our lesson and go outside.”)
Quick Check
- What is a loop? (Sample response: "A loop is a bit of programming that is repeated a number of times in a row.")
- What Dash and Dot cues can trigger an event? (Sample responses: "Top Button Pressed," "Hear Clap," "Hear Voice")
Before the Lesson
Prior Experience
It is recommended that students complete:
- Level A-C Lessons: All
- Level D: Lesson 1
- [Optional] Level A-C Challenge Cards: All
- [Optional] Level D Challenge Cards: D 1.1-1.3
You can purchase our Learn to Code Challenge Card sets and Curriculum Guide here: https://store.makewonder.com/#/education
Preparation
- Fully charge the tablets and robots.
- Install the Wonder Workshop Blockly app on each tablet.
Review
Loop and Event Handler Review
Briefly review how students used event handlers in previous lessons by asking:
- "What is an event handler?" (Sample response: "Event handlers are behaviors that the computer keeps looking for, even while other parts of the program are running.")
- "In the past, what cues have you used while programming Dash or Dot?" (Sample responses: "When Button 1 Pressed," "When Top Button Pressed," "When Start," etc.)
- What is a repeat block, and how is it used? (Sample response: "A repeat block plays the behaviors placed INSIDE it the number of times you tell it to. It is used when you want to use the same sequence of code over and over.")
Blockly In-App Puzzle [Optional]
- Have students complete the Police Officer Dash puzzle. You can find walkthroughs, solutions, and extensions for the puzzle.
- Have students update their Blockly Puzzle Checklists.
- Note: If previous puzzles are locked, show students how to quickly unlock them using this strategy: https://help.makewonder.com/customer/en/portal/articles/2318965-how-can-i-reset-challenges-unlock-free-play-or-unlock-wonder-cloud-?b_id=14312
Code.Org Connections [Optional]
- Review Code.org's Course C, Lesson 12: https://curriculum.code.org/csf/coursec/12/. Then ask:
- "How were events helpful throughout the Flappy game?" (Sample response: "Events told the game to do a variety of behaviors when something specific happened. For example, one event said, 'When Flappy hits the ground, the game is over.'")
- "Why is it helpful to use more than one event?" (Sample response: "Using more than one event allows the computer to always be on the lookout for several behaviors.")
- Say, "When you play a video game, you don't use just one button; usually you use several. The code for the video game uses at least one event handler per button."
