|
Computer Science Home
6th Grade Tech Ed
7th Grade Computer Science
8th Grade Computer Science A
Gmail
Google Drive
Google Classroom
Infinite Campus
Typing.com
(Join Class through Google Classroom)
Schoology
Code.org
Tynker Coding Website
Tynker Resource Page
Tynker Online Support Video Help
Quizlet | Quizlet LIVE
Everfi
Khan Academy
Social Media Tips
Netsmartz
Code HS
Karel the Dog class code: 1251
CSTA Standards
ISTE Standards
|
Broadcasting Messages (12)
Introduction
In this lesson, students will learn how to send and receive messages between Actors in a program. Headphones (1 per student) are recommended.
New Code Blocks
- : Listen for a message or broadcast from other scripts before activating.
- : Broadcast a message to the program.
Objectives
Students will...
- Use code block to program Actors to send and receive messages
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” block- This code block sends a message to the specified Actor.
- “Broadcast” block- This code block sends a message to all of the Actors in a project.
- “When I receive” block- The 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 “Step 6/6” 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.5.4.A, 6-8.RST.3, 6-8.RST.4, 6-8.RST.7
- CSTA: IB-AP-11, 1B-AP-12, 1B-AP-15, 2-AP-13, 2-AP-16, 2-AP-17
- CS CA: 3-5.AP.10, 3-5.AP.13, 3-5.AP.14, 3-5.AP.17, 6-8.AP.13, 6-8.AP.16, 6-8.AP.17
- ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 6.b
U.K. Standards
National Curriculum of England (Computing)
Key Stage 2:
- Design, write and debug programs that accomplish specific goals, including controlling or simulating physical systems; solve problems by decomposing them into smaller parts
- Use sequence, selection, and repetition in programs; work with variables and various forms of input and output
- Use logical reasoning to explain how some simple algorithms work and to detect and correct errors in algorithms and programs
Key Stage 3:
- Design, use, and evaluate computational abstractions that model the state and behaviour of real-world problems and physical systems
- Understand several key algorithms that reflect computational thinking (for example, ones for sorting and searching); use logical reasoning to compare the utility of alternative algorithms for the same problem
- Use two or more programming languages, at least one of which is textual, to solve a variety of computational problems; make appropriate use of data structures (for example, lists, tables, or arrays); design and develop modular programs that use procedures or functions
- Understand simple Boolean logic (for example, AND, OR, and NOT) and some of its uses in circuits and programming; understand how numbers can be represented in binary, and be able to carry out simple operations on binary numbers (for example, binary addition, and conversion between binary and decimal)
- Understand how instructions are stored and executed within a computer system; understand how data of various types (including text, sounds, and pictures) can be represented and manipulated digitally, in the form of binary digits
U.S. Standards
- K-12 CTSA Computer Science Standards (Revised 2017)
Computer Science Teachers Association:
- 1B-AP-10
- 1B-AP-11
- 1B-AP-12
- 1B-AP-15
- 2-AP-12
- 2-AP-13
- 2-AP-15
- 2-AP-16
- 2-AP-17
CCSS-Math: MP.1
- CCSS-ELA: RF.5.4.A, 6-8.RST.3, 6-8.RST.4, 6-8.RST.7
- CS CA: 3-5.AP.10, 3-5.AP.12, 3-5.AP.13, 3-5.AP.14, 3-5.AP.17, 6-8.AP.12, 6-8.AP.13, 6-8.AP.16, 6-8.AP.17
- ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 6.b
|