Lesson Plan

Lesson: Broadcasting Messages
Time: 60+ mins

Introduction

In this lesson, students will learn how to send and receive messages between Actors in a program. Note: Some modules in this lesson include a listening component, so headphones (1 per student) are recommended.

Code Blocks

  • : Listen for a message or broadcast from other scripts before activating.
  • : Broadcast a message to the program.
  • : Play the specified kind of drum for the specified number of beats.
  • : Pause the program for a specific number of seconds.
  • : Change the costume of the Actor.

Vocabulary

  • None

Objectives

Students will...
  • Use code block to program Actors to send and receive messages

Materials

  • Computers, laptops, or mobile devices (1 per student) with student account access to Tynker.com
  • Headphones (1 per student)

Warm-Up (15 minutes)

  • As a class, review vocabulary terms. Ask students, "Can anyone tell me what _____ means?" Here is a list of recommended vocabulary terms to review: coding, sequence, Actors, infinite loop, repeating loop, animation.

Activities (45 minutes)

Facilitate as students complete all Broadcasting Messages modules on their own:
1. Introduction (Video)
  • This module introduces three coding concepts:
    • Send Message To- The "sent message to" code block sends a message to the specified Actor.
    • Broadcast- The "broadcast" code block sends a message to all of the Actors in a project.
    • When I Receive- The "when I receive" code attached to this event block will run when it receives a message from a "send message to" or "broadcast" block.
2. Send a Message Example (Example)
  • This module is an example of a musical project, where each button will send a message to the BeatBot and make it dance!
3. Button Sounds (DIY)
  • In this DIY (do-it-yourself) project, students will follow step-by-step directions to program the button Actors to control the BeatBot!
  • Emphasize to students that the "broadcast" block is used to send messages from the button Actors to the BeatBot. Note that the BeatBot is already coded to respond to each message by performing a dance move.
  • Optional: Ask students, "Why did we add the ‘next costume’ and ‘wait’ blocks beneath the ‘broadcast’ blocks?" (To animate the buttons so they look like they’re actually being pressed)
  • Did students finish early? Direct their attention to the bonus section in the last step of the tutorial, which encourages students to adjust the dance speed by modifying the BeatBot’s code.
4. Send Two Messages (Puzzle)
  • To solve this puzzle module, students will need to program the buttons to send messages to the BeatBot. Additionally, students will need to program the BeatBot to play a drum sound when it receives each message.
  • As students are testing their program, check that they are pressing the button Actors the moment the falling orbs are lined up with them. 4 points wins the game!
5. Add your Background Music Example (Example)
  • Now that your students know how to send messages, they will view a project where the BeatBot plays music when it receives messages!
6. Add your Background Music (DIY)
  • In this DIY project, students will add background music and program two buttons to make the BeatBot play sounds.
  • Ask your students to play the sounds using the buttons. Can they make a beat to go along with the background music?
  • Did students finish early? Encourage them to experiment with their code to make the BeatBot move when it plays a sound!
7. Quiz (Multiple Choice)
  • Students will answer 5 multiple choice questions to review concepts covered in this lesson.

Extended Activities (10 minutes)

Discuss the following with students:
  • Who can remember one example where we programmed Actors to respond to one another through broadcasting and receiving messages? (programed buttons to make the BeatBot play sounds)
  • How else can we use broadcasting and receiving messages in a scene? (e.g., create a race game in which an Actor is programmed to say "On your mark. Get set. Go!" and the other Actors respond by starting to move across the screen.
  • True or false: The "broadcast" code block sends a message to all of the Actors in a project. (True)

U.S. Standards

  • CCSS-Math: MP.1
  • CCSS-ELA: RF.1.1, RF.2.4, RF.2.4.A, RF.3.4.A, RF.4.4.A, RI.2.6
  • CSTA: 1B-AP-10, 1B-AP-11, 1B-AP-15
  • CS CA: 3-5.AP.12, 3-5.AP.13, 3-5.AP.17
  • ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 6.b
This course is not part of your plan. Please upgrade to view all answer keys

Class Presentations

These student-facing slide presentations help educators seamlessly run Tynker lessons in a virtual or physical classroom setting. Each lesson has its own set of slides that introduce the big ideas, suggest unplugged activities, and include a section for each activity module. While running lesson slides, you can switch back and forth between the activity, the slides, answer keys and other lesson materials.
A sample slide presentation is available for your review. Please log in to view all the class presentations available with your plan..
Lesson 1
Introduction
27 Slides
Lesson 2
Loops and Animation
19 Slides
Lesson 3
Creating a Scene
21 Slides
Lesson 4
Jumping over Obstacles
20 Slides
Lesson 5
Storytelling
23 Slides
Lesson 6
User Interaction
19 Slides
Lesson 7
Guessing Game
22 Slides
Lesson 8
Rotation
20 Slides
Lesson 9
Alien Invaders
17 Slides
Lesson 10
Music and Animation
18 Slides
Lesson 11
Instruments and Tempo
19 Slides
Lesson 12
Broadcasting Messages
18 Slides
Lesson 13
Time Limits
17 Slides
Lesson 14
Message Driven Programming
18 Slides
Lesson 15
Pop the Balloon
18 Slides
Lesson 16
Animation with Movement
18 Slides
Lesson 17
Obstacle Course
19 Slides