# Sphero - Young Inventors

Years 7-8

## Overview

### Prior Student Learning

Students have been exposed to Sphero using play-based learning, and are able to create simple algorithms using SPRK Lightning Lab.

## Learning hook

How can Sphero be used to solve problems the real world?

What is the algorithm for the program that will run on the Sphero?

Ask the students to think about tasks that are repetitive or complex, or requiring precision for example, a medicine case needs to be moved across a map, going to specific points to deliver the medicine.

Introduce the students to the concept of functions, showing how functions dramatically reduce the number of lines of code we have to write.

For each algorithm, students work in groups to identify the basic building blocks for achieving the task:

• How many building blocks can students identify?

Introduce the concept of function parameters and how these are used within functions.

## Learning map and outcomes

1. Revisit previous knowledge of Sphero
2. Introduce and attempt challenge
3. Students write the pseudo code for the algorithm that will achieve the planned outcome
4. Students identify the key building blocks for the algorithm
5. For example, for a Sphero that transports weight between different points on a map, the key building block could be:
• roll in a straight line for a while, corresponding to x meters (x is a parameter)
• make a turn if a variable is set
6. The algorithm would then see the repetition of this building block a number of times, with different parameter values.
7. This building block is called a function, say move
8. Students write the algorithm using repeated calls to move:
• move(5)
• move(4)
• ...
9. Students write the SPRK program and test the program in groups
10. Students their solutions to the brief in group discussion format

## Learning input

• Revisit knowledge of Sphero technology and coding
• Discuss possible device adaptations which could ‘add value’ to its usage
• Discuss the shortcomings of this device, eg. it’s just a ball
• Allow time for discussion on Bluetooth and comparisons to Wireless.
Discuss wireless, Bluetooth and connected networks.
• Introduce or elaborate on visual programming languages and the importance of clear instructions (Algorithms) when controlling Sphero and setting tasks.
• Discuss benefits of using functions.
• Discuss challenges of using functions.

## Learning construction

Students are now asked to consider an adaptation to the Sphero that will serve a new purpose eg carrying a passenger, leaving a track (eg texta), pushing material, pulling material

A variety of materials will be provided to provoke thoughts and ideas.

Students must respond to the following brief:

• Adapt Sphero by adding accessories to invent solutions to workplace or other problem.

Define what your machine is designed to do, and create a code that allows Sphero to perform the required task. Eg. Sphero pulls 500g of weight 1m to serve the purpose of an automated wheelbarrow.

Write the pseudocode for your algorithm, identifying building blocks that could be used as functions. Students can do this by first decomposing the behaviour into main blocks, and then identifying behaviour that could be suitable to be implemented as a function:

• Is the Sphero doing something repeatedly?
• Is the Sphero doing something where some key parameters change?

Write the code for the Sphero and load the code on it.

Students test and debug the code in pairs.

• What problem is being solved?
• Why is this design useful?
• What did you hope your design would be able to achieve? Did your code work to achieve this?
• What worked and what didn’t work in your design?

The rest of the class are required to ask informed questions or provide constructive feedback to the presenting group to demonstrate students’ ability to reflect upon their work and respond to feedback.

## Learning demo

Demonstrate examples of Sphero adaptations (photos, videos) such as the ones below. Be aware that showing examples may lead to ‘copying’ with thought.

Copying with variations will be acceptable.

## Learning reflection

• What problem is being solved?
• Why is this design useful?
• What did you hope your design would be able to achieve? Did you code work to achieve this?
• What worked and what didn’t work in your design?

The rest of the class are required to ask informed questions or provide constructive feedback to the presenting group to demonstrate students’ ability to reflect upon their work and respond to feedback.