← Back to Library
Lesson PlanFreeEN

CyberPi: Gift Alarm

Students will use the CyberPi to create a program which detects whether or not a friend has shaken their birthday present. Through the use of wireless communication, students will send messages between computing devices, allowing one device to control another.

Gr. 6–8
CyberPi: Gift Alarm

Lesson

Overview

Description

Students will use the CyberPi to create a program which detects whether or not a friend has shaken their birthday present. Through the use of wireless communication, students will send messages between computing devices, allowing one device to control another.

Objectives

  • Use wireless network technology to communicate between computing devices.

  • Solve a problem using a computational solution.

  • Identify uses for wireless communication.

Before the Lesson

Preparation

For the teacher and students:

Example program(s): CyberPi – Lesson 9 – Gift Alarm

Review

Warm Up

Internet of Things

Facilitate a short research activity on the Internet of Things. Have students research and present their findings. Their research should lead them to learn more about how internet-connected physical computing devices are used in the following applications:

  • Smart Homes

  • Healthcare Monitoring

  • Transportation

  • Agriculture

  • Weather

  • Manufacturing

  • Environmental Research

  • Military

Direct Instruction

Tour of mBlock 5

1. Open the mBlock software or mBlock 5 Web version.

2. Introduce students to the following key areas of the software interface:

Connect the CyberPi

3. Plug the CyberPi into the computer using the included cable. The CyberPi should boot up and the screen will display either the last program uploaded or the Home menu.

4. On the "Devices" tab in mBlock, click the "Add" button. Select CyberPi and click "Ok".

5. Click the "Connect" button. Then, select the USB port and click "Connect".

6. If connected successfully, the button will change to "Disconnect".

Guided Practice

Hands On

Wireless Communication in mBlock

1. There are two types of wireless communication in mBlock: Wi-Fi and LAN. Review the following information and blocks for each type.

2. Select the type of communication that will work for with your classroom and students. Use the following steps as an example of how wireless communication works in mBlock.

3. Open the mBlock 5 software or mBlock 5 Web version. Add the CyberPi in the Devices tab and connect in Upload mode.

4. On the Panda sprite, in the Block Area, click the

 button. Find the User cloud message extension and click +Add.

5. Instruct students to build the following scripts:

6. Update the Wi-Fi ssid and password with the information for the wireless router in your location for the CyberPi to connect.

7. Upload the program to the CyberPi and test the program. Students should observe Panda walk when the CyberPi is shaken.

8. If the program does not appear to work, add the following code to the CyberPi script to troubleshoot the Wi-Fi connection:

Independent Practice

Try It

Creating a Gift Alarm

1. Using the following problem statement, instruct students to plan a solution to the problem. There are many ways to solve this problem; one sample solution has been provided for you.

2. Have students write pseudocode for the Gift Alarm and then create the project using their pseudocode as a guide.

Extension

  • Have students develop their own project using wireless communication.

  • Have students research networks and the role they have in society.

Wrap Up

Wrap-Up & Quick Check

Brainstorming Ideas

Wireless communication and cloud messages eliminate barriers such as cord length and device location. With the class, brainstorm a list of ideas for programs that could benefit from wireless communication. Some ideas may include:

  • Weather station which reports to a separate device.

  • Survey collection device in a main location of the school which reports results to the classroom.

  • Walkie talkie or text messaging between devices.

  • CyberPi connecting to your PC

Downloadable Material

Example Program

Educational Standards

CSTA

CSTA

  • 2-AP-13: Decompose problems and subproblems into parts to facilitate the design, implementation, and review of programs.

ISTE

ISTE

  • 5c: Students break problems into component parts, extra key information, and develop descriptive models to understand complex systems or facilitate problem-solving.

K12 CS Framework

K12 CS Framework

  • Practice 3-1: Identify complex, interdisciplinary, real-world problems that can be solved computationally.

  • Practice 3-2: Decompose complex real-world problems into manageable subproblems that could integrate existing solutions or procedures.

  • Practice 3-3: Evaluate whether it is appropriate and feasible to solve a problem computationally.

Alberta - Grade 6-8 - CTF

Grade 6-8

CTF

- Planning, creating, appraising and communicating in response to challenges. 

- Working independently and with others while exploring careers and technology.

British Columbia - Grade 6-8 - ADST

Grade 6-7

ADST

• Generate potential ideas and add to others’ ideas 

• Identify and evaluate the skills and skill levels needed, individually or as a group, in relation to a specific task, and develop them as needed 

• Select, and as needed learn about, appropriate tools and technologies to extend their capability to complete a task 

Grade 8

ADST

• Generate potential ideas and add to others’ ideas 

• Make a plan for production that includes key stages, and carry it out, making changes as needed

• Identify and evaluate the skills and skill levels needed, individually or as a group, in relation to a specific task, and develop them as needed

• Select, and as needed learn about, appropriate tools and technologies to extend their capability to complete a task

Manitoba - Grade 6-8 - Science

Grade 6

Science (Overall Skills and Attitudes)

  • 6-0-4a: Carry out procedures that comprise a fair test. Include: controlling variables; repeating measurements to increase accuracy and reliability.

  • 6-0-4c: Work cooperatively with group members to carry out a plan, and troubleshoot problems as they arise.

Grade 7

Science (Overall Skills and Attitudes)

  • 7-0-4a: Carry out procedures that comprise a fair test. Include: controlling variables, repeating experiments to increase accuracy and reliability

  • 7-0-4c: Work cooperatively with team members to carry out a plan, and troubleshoot problems as they arise.

Grade 8

Science (Overall Skills and Attitudes)

  • 8-0-4a: Carry out procedures that comprise a fair test. Include: controlling variables, repeating experiments to increase accuracy and reliability

  • 8-0-4c: Work cooperatively with team members to carry out a plan, and troubleshoot problems as they arise.

New Brunswick - Grade 6-8 - Science

Grade 6-8

Science (Attitude Outcome)

  • 425: show a continuing curiosity and interest in a broad scope of science-related fields and issues

  • 430: persist in seeking answers to difficult questions and solutions to difficult problems

  • 431: work collaboratively in carrying out investigations, as well as in generating and evaluating ideas

Newfoundland & Labrador - Grade 6-8 - Science

Grade 6-8

Science

  • GCO: Skills - Students will develop the skills required for scientific and technological inquiry, for solving problems, for communicating scientific ideas and results, for working collaboratively, and for making informed decisions.

Nova Scotia - Grade 6-8 - Mathematics & ICT/Technology

Grade 6

Mathematics

N09 Students will be expected to explain and apply the order of operations, excluding exponents, with and without technology (limited to whole numbers). 

Performance Indicators: 

N09.01 Demonstrate and explain, with examples, why there is a need to have a standardized order of operations. 

N09.02 Apply the order of operations to solve multi-step problems with or without technology (e.g., computer, calculator). 

PR03 Students will be expected to represent generalizations arising from number relationships using equations with letter variables. 

Performance Indicators: 

SCO PR03 Students will be expected to represent generalizations arising from number relationships using equations with letter variables. [C, CN, PS, R, V] 

PR03.01 Write and explain the formula for finding the perimeter of any regular polygon. 

PR03.02 Write and explain the formula for finding the area of any given rectangle. 

PR03.03 Develop and justify equations using letter variables that illustrate the commutative property of addition and multiplication (e.g., a + b = b + a or a × b = b × a). 

PR03.04 Describe the relationship in a given table using a mathematical expression. 

PR03.05 Represent a pattern rule using a simple mathematical expression, such as 4d or 2n + 1. 

ICT

  • P2: Students will be expected to use digital tools to develop ideas and original works in innovative ways.

  • TOC1: Students will be expected to

* safely use many forms of current technology for learning with growing competence

* demonstrate conceptual understanding of how information and communication technology, digital tools, and authorized networks support their learning

* use terminology related to information and communication technology

Grade 7

Mathematics

PR05 Students will be expected to evaluate an expression given the value of the variable(s). 

Performance Indicator: 

PR05.01 Substitute a value for an unknown in a given expression and evaluate the expression. 

Technology

  • GCO1: Students will be expected to design, develop, evaluate, and articulate technological solutions

  • GCO2: Students will be expected to operate and manage technological systems

Grade 8

Technology

  • GCO1: Students will be expected to design, develop, evaluate, and articulate technological solutions

  • GCO2: Students will be expected to operate and manage technological systems

Ontario - Grade 6-8 - Mathematics

Grade 6

Mathematics

Algebra

  • C3.1 solve problems and create computational representations of mathematical situations by writing and executing code, including code that involves conditional statements and other control structures

Grade 7

Mathematics

Algebra

  • C3.1 solve problems and create computational representations of mathematical situations by writing and executing code, including code that involves events influenced by a defined count and/or sub-program and other control structures

Grade 8

Mathematics

Algebra

  • C3.1 solve problems and create computational representations of mathematical situations by writing and executing code, including code that involves the analysis of data in order to inform and communicate decisions

Prince Edward Island - Grade 6-8 - Science

Grade 6-8

Science

  • GCO: Skills - Students will develop the skills required for scientific and technological inquiry, for solving problems, for communicating scientific ideas and results, for working collaboratively, and for making informed decisions.

Quebec - Grade 6-8 - Science

Grade 6-8

Science (Strategies)

  • Exploring various ways of solving the problem

  • Exchanging information

  • Comparing different possible explanations for or solutions to a problem in order to assess them (e.g. full-group discussion)

Saskatchewan - Grade 6-8 - Science

Grade 6-8

Science (Goals)

  • Develop Scientific and Technological Skills – Students will develop the skills required for scientific and technological inquiry, problem solving, and communicating; for working collaboratively; and for making informed decisions.