Students have been exposed to Sphero using play-based learning, and are able to create simple algorithms using SPRK Lightning Lab. They are familiar with the coding aspects to enable basic control of a Sphero eg move in a square.
Discuss with students mazes:
Ask students to devise an algorithm to get the Sphero to the center of this maze:
Ask them how many instructions they would have to use to get the Sphero inside the center of this maze.
Introduce the students to the concept of functions, showing how functions dramatically reduce the number of lines of code we have to write.
Identify the basic building blocks for getting to the centre of this maze:
Introduce the concept of function parameters and how these are used within functions.
The teacher introduces the Sphero or Spheros to the class. Have the students discuss how Sphero can be sent instructions.
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.
Students will work collaboratively to plan out their algorithm and write the program with and without functions.
Students will then work together to test and debug their programs.
Students can test their programs for different maze sizes.
As an extra challenge, students could devise mazes for other teams, and test and debug programs.
Another challenge can be asking students to write their program with the smallest number of blocks in the main part.
Once the lesson is complete, students will be able to move their Sphero to the center of the maze and show the repeated use of functions.
Encourage students to reflect on the process:
There are many Sphero apps now available to explore with your students on the iPad, more being added over time. Only a few are currently compatible with Sphero SPRK+. Here are some of the ones you might explore with your student: