Вы находитесь на странице: 1из 21

Sphero SPRK+​ Three Day Curriculum

Required Devices: You should have at least one ​Sphero SPRK+​ to run this course.
Otherwise, students will have no way to test their code! Ideally. An iPad tablet is
required to run your code on a drone. You should have one tablet for each SPRK+ that
you have.

The educational bundle could be purchased from EAI Education. ​ Sphero®


SPRK+ Educational 12 Pac ​for $1199.99

Day 1:
Lesson 1: Ice Breakers 1
Expected Time: 45 - 60 minutes

Students will be able to apply these concepts:

Introduction to Swift Playground


Introduction to SPRK+
Rolling forward and back
Calculate how many seconds the SPRK+ needs to move based on its speed and how far it
needs to go

Key Vocabulary

Materials, Resources, and Prep:


Have at least one SPRK+ that has been updated to the most recent firmware.
Make sure it is paired with just one tablet and that both the tablet and drone are
fully charged. ​Research sport of Sumo wrestling. ​Have multiple plastic or styrofoam
cups for ​Sumo Wrestling activity. Print out enough sumo wrestlers. Cardboard circle of
1-meter diameter.

Activities​: ​For this first lesson, it’s nice to do the activities together as a class, talking
through the logic and working on a large screen at the front of the class.

1. Get to know each other


2. Introduction to Swift Playground
3. Introduction to Sphero SPRK+
4. Sumo Wrestling (45 -60 min)
Discuss the sport of Sumo wrestling. Have students cut out (and color if they would like)
their sumo wrestler from the paper template.Tape their Sumo to the outside of their cup and
prepare for battle. Students will try to push their opponent out of a 1-meter diameter ring.
https://youtu.be/sC71cwOkxyg
Lesson 2: Ice Breakers 2

Expected Time: 45 - 60 minutes

Teams of Spheros battle for the coveted World Sphero Cup. Two different colored teams try to
drive their Spheros into the soccer ball to try and score goals.
Key Projects:

Key Vocabulary:

Materials, Resources, and Prep:

Have at least 10 SPRK+ that has been updated to the most recent firmware.
Make sure it is paired with just one tablet and that both the tablet and drone are
fully charged.
Soccer field, a soccer ball. Soccer field does not have set dimensions and could
be built from materials on hand, it could also be just a marking on the floor.

Activities​:

World Cup Soccer (45 -60 min)

Teams of Spheros battle for the coveted World Sphero Cup. Two different colored teams try to
drive their Spheros into the soccer ball to try and score goals.

Divide students into two teams and have them select a color for their Spheros to represent that
team. At the beginning of the game and after each goal scored, each team must start with their
Sphero touching their end wall and the ball starts at the halfway center line. When the 'whistle'
blows, teams drive their Spheros colliding with the soccer ball trying to pass it into the other
team's goal. Players defending their goal may not park their Sphero in front of it and there are
no goalies.
https://edu.sphero.com/cwists/preview/122x

Lesson 3: Hello World!

Expected Time: 1- 2 hours


Learn the basics of the text canvas, loops, and some tips to get started with

your first lines of JavaScript code. This is a great activity if you want to jump

into text doing for the first time

Key Projects:

Key Vocabulary:

Function:

Argument:

Materials, Resources, and Prep:

Have at least 10 SPRK+ that has been updated to the most recent firmware.
Make sure it is paired with just one tablet and that both the tablet and drone are
fully charged.
Make sure that Swift Playground app is installed and Sphero Template Activity is
installed.

Activities​:

1. Hello Square!

Run the code of Sphero Template

2. Hello Line!

Modify code of Sphero Template to make only one line


3. Parts of a Loop

Modify code of Sphero template to drow only one square. Students could
keep using a while loop or use a for loop instead.

Lesson 4: ​ Conditionals
Expected Time: 45 - 60 minutes

Students will be able to apply these concepts:

Draw a flow diagram


Create a code from pseudocode

Key Vocabulary

Code Block {}: These blocks represent programming concepts and can be attached to create
programs.

Loops: ​while, infinite

Command/Function:

Variable: ​if / else

Conditionals: Your drone’s altitude is its height above the ground.

Data types: Moving your drone up and down

Materials, Resources, and Prep:


Have at least one drone that has been updated to the most recent firmware.
Make sure it is paired with just one tablet and that both the tablet and drone are
fully charged.
Have a spare drone battery available if possible.

Activities​: ​For this first lesson, it’s nice to do the activities together as a class, talking

through​ the logic and working on a large screen at the front of the class.

1. Exploration - Conditionals
Most software programs include ​conditionals​. A conditional is an action that
takes place when certain conditions or requirements are met. An example is
an ​if/else​ statement.

In this activity, you will design your own “Toss Game” ​Watch the video below
for an overview of what you will be doing.
https://youtu.be/8HnoIO64yvs

2. Exploration - Flow Diagram


Do a quick Google search for JavaScript ​flow diagrams​ (or flowcharts). Flow
diagrams are used to structure and order a complex system. In this case, you
will create a structure and order for a program.

Look through some examples and decide the look and feel that works best for
you. Your flow diagram should show -- ​When Sphero is thrown, a
conditional statement using an accelerometer threshold will play a
random animal sound​. Based on what you understand, draw a flow diagram
of the logic for the toss game. Make sure you include an if/else statement.

3. Skills Building - Pseudocode to Code


Look at the pseudocode below to help you build this program! Some code is
already written for you.

4. Write the initial logic for the game.


Inside the startProgram function, call the setStabilization function (pass
.off into it)

Func onReady() {
// set stabilization to false

while (true) {
const accelTest = // add accelerometer calculation here

// if accelTest is greater than 3


// set the main LED to green

// else
// set the main LED to red
wait( for: 0.05);
}
}

The code above contains a ​while loop​ that has no stopping case. Inside of
this loop, create an if/else statement that turns the Sphero green (and plays
an animal sound) whenever the robot is tossed.

● Look at the Sphero documentation if you forget what functions to use


(for example, ​how to set the main LED color​).
● To get the accelerometer sensor reading and then calculate the “total”
axis, which will ensure that acceleration in ANY direction will cause a
spike in the reading for your conditional, use the code found ​here​.

5. Play The Game and Debug


Now you get to play the game! Run your program and record a video of you
playing the game to share with your teacher.
● Is the game running as expected?
○ If not, what went wrong?
○ Where in the code will you look first?
○ Test it each time you make a change.

6. ​Reflection

Reflect on what you learned with Sphero by answering the following

questions:

● Where did you struggle most in this activity?


● What was the easiest part for you?
● What is a conditional?
● What was the conditional in the game?
● Why does the while loop never stop?
● If you wanted it to stop, how might you write this differently?

Lesson 5: Variables
Expected Time: 1- 2 hours

Students will be able to apply these concepts:

- Draw a flow diagram


- Create code from pseudocode
- Reading technical documentation
Key Vocabulary

Code Block {}: These blocks represent programming concepts and can be attached to create
programs.

Command/Function:

Normalization
Absolute value
Conditional: if / then / else
Loops: infinite, while
Gyroscope

Materials, Resources, and Prep:

Activities​: ​For this first lesson, it’s nice to do the activities together as a class, talking
through the logic and working on a large screen at the front of the class.

1. Exploration - Introduction
Review the video ​https://youtu.be/AgSSSOKIJZA​ and answer the following
questions:

a. What does LED stand for?


b. Can you think of other devices (besides Sphero) that use LEDs?
c. Why does Sphero only need three different color channels?

2. Exploration - Gyroscope
Watch the ​https://youtu.be/2-vOorCsEFU​ to learn all about how Sphero's
gyroscope works.
a. What is the vertical axis also known as and how is it measured?
b. What is the horizontal and forward axis known as?
c. How do you designate whether the Sphero spins clockwise or
counterclockwise? What is your value range?

3. Skills Building - Programming Resources


Write the initial logic for the program.

a. Inside the startProgram function, call the setStabilization()


function (pass .off)
b. Turn on the back LED

func onReady() {
// set stabilization to false
// turn on back LED
// speak "Spin sphero like a top to change the L.E.D. Colors"

while (true) {
// continously evaluate the yaw spin rate
// normalize gyroscope spin value

// if yaw spin rate is greater than zero (counter clockwise)


/// set main LED a matching value of green
// else
//turn main LED a matching value of red (clockwise)

wait( for: 0.025); // leave this here


}
}

Within the ​while​ loop, you will evaluate the Sphero's yaw spin rate using the
gyroscope. In order to do this effectively, you need to do a little math to
normalize ​(represent a number or another scale on a different scale)
Sphero's spin rate and the LED's RGB value.
The gyroscope's spin rate ranges from 0 to 2000 degrees per second. The
LED's RGB scale goes from 0 to 255. You will normalize these two scales so
that you can express every spin value as a color.

So, to normalize the yaw spin rate and LEDs -- 2000 / 255 = 7.84

7.84​ will be used as the divisor in your code to express each spin rate as a
color.

Day 2: Martian Expedition

Martian Mission 1: Stranded Miner


Expected Time: 45 - 60 minutes

Students will be able to apply these concepts:

YEAR 2032,​ ​DAY 79, BASECAMP ALPHA:​ A terrible dust storm has swept in
and cut off one of our Martian miners on his way back to our basecamp. Can
you write a "Roll," "Stop," and "Delay" command to locate our stranded miner?
In preparation for this mission, your team must first experiment with the roll
and stop commands and graph your findings on your included handout. Take
careful measurements! Once your data has been collected, you will be given
the miner's actual distance from basecamp (in centimeters). Then using your
data, you must come up with the best rescue code. The team that gets the
closest to our stranded miner without hitting him wins. Your team will have 3
attempts.
Key Vocabulary

Materials, Resources, and Prep:


Have at least one drone that has been updated to the most recent firmware.
Make sure it is paired with just one tablet and that both the tablet and drone are
fully charged.
Miner, meter stick, handout
https://sphero-media-live.s3.amazonaws.com/cwist/picturesteps/a4/a2/Martian%20Missio
n%201.docx

Activities​: ​For this first lesson, it’s nice to do the activities together as a class, talking
through the logic and working on a large screen at the front of the class.

1: Stranded Miner

Martian Mission 2: Return to Basecamp


Expected Time: 45 - 60 minutes

Students will be able to apply these concepts:

Having located our stranded Martian Miner in Mission 1, Students must now
return our wounded miner to basecamp. Be quick! He is almost out of
Oxygen.

Mission Objective: Now that you have successfully located our stranded
Martian miner (Martian Mission 1), your team must create a set of MACRO
commands for his safe return to basecamp. Take careful measurements
and use the data you collected last week in your line graph – “Start and stop
Macro lesson 1.” You may adjust speed to 20%, 40%, or 100%. You will
have three attempts to successfully dock your Sphero at basecamp (within the
circle). Once there, your Sphero must turn BLUE to indicate oxygen is
being delivered to your rescued miner! Good Luck!
https://edu.sphero.com/cwists/preview/155x

Key Vocabulary

Materials, Resources, and Prep:


Have at least one drone that has been updated to the most recent firmware.
Make sure it is paired with just one tablet and that both the tablet and drone are
fully charged.
https://sphero-media-live.s3.amazonaws.com/cwist/picturesteps/aa/e6/Martian%20missio
n%202%20Return%20to%20Martian%20Basecamp.docx

Activities​: ​For this first lesson, it’s nice to do the activities together as a class, talking
through the logic and working on a large screen at the front of the class.

Martian Mission 2: Return to Basecamp

Martian Mission 3: Deploy Perimeter Beacons


Expected Time: 45 - 60 minutes

Students will be able to apply these concepts:

In order to protect our Martian Basecamp and to maintain communication with


Mission Control on Earth, Your team must set up and activate 4 beacons
around the perimeter of our base camp. Your Sphero must flash RED at
each corner to indicate that the beacon has been activated. Once your
mission is complete and all 4 beacons have been activated, Sphero must
return to basecamp and power down into sleep mode to conserve power.

Key Vocabulary

Materials, Resources, and Prep:


Have at least one drone that has been updated to the most recent firmware.
Make sure it is paired with just one tablet and that both the tablet and drone are
fully charged.
https://sphero-media-live.s3.amazonaws.com/cwist/picturesteps/f4/f8/Martian%20Missio
n%203%20Basecamp%20Perimeter%20Beacons.docx

Activities​:

Martian Mission 4: Martians Attack!


Expected Time: 45 - 60 minutes

Students will be able to apply these concepts:

Perimeter beacons indicate that aliens are attacking our basecamp! Plot
coding commands to destroy all aliens, but take care not to injure any of our
friendly miners.
Martians have breached our perimeter beacons and they are closing in on our
location! Your mission is to write code for Sphero to destroy all the
Martians before they can reach our basecamp and knockout our central
communication tower. The beacon signals are fading fast, but we know we
have aliens at the following coordinates: (0, 3), (3, 11), (8, 7), (10, 19), (12,
13), (13, 1), (17, 8), (17, 17), (19, 1), and (20, 14). Plan carefully and take
accurate measurments so as to not to injur any of our miners. They are
located at the following coordinates: (4, 17), (10, 9), and (15, 14). Your team
will receive a point for every martian destroyed, but your turn will be over
should you hit any of our miners. Each box below represents 10 cm. You
will have 3 attempts. Good Luck!

Key Vocabulary

Materials, Resources, and Prep:


Have at least one drone that has been updated to the most recent firmware.
Make sure it is paired with just one tablet and that both the tablet and drone are
fully charged.
https://sphero-media-live.s3.amazonaws.com/cwist/picturesteps/e1/27/Martian%20Missi
on%204%20Martians%20Attack.docx

Activities​:

Martian Mission 5: Collapsed Mine!


Expected Time: 45 - 60 minutes

Students will be able to apply these concepts:

The Martian invaders have been driven from our basecamp and
communication has been restored with Mission Control on Earth. We are
receiving a weak transmission from a trapped miner in an isolated mining
shaft that was destroyed when the Martians attacked. Your team’s mission is
to write lines of code to navigate through the debris to the stranded miner.
The mine shaft is in a very fragile state – a Sphero collision can cause a total
collapse. If your Sphero touches any debris your team must remove your
Sphero from the ‘mine’, adjust your coding, and start over. Your Sphero
should turn GREEN upon completion of your mission to indicate the
successful location of our survivor. The closest team to the miner wins the
challenge. Remember, the miner has a limited supply of oxygen so time is a
constraint! You may use your data from previous missions and the grid below
in your planning. Good Luck!

Key Vocabulary

Materials, Resources, and Prep:


Have at least one drone that has been updated to the most recent firmware.
Make sure it is paired with just one tablet and that both the tablet and drone are
fully charged.
https://sphero-media-live.s3.amazonaws.com/cwist/picturesteps/a2/96/Macro%20Mission
%205%20Collapsed%20Martian%20Mine.docx

Activities​:

Martian Mission 6: Crater Chaos!


Expected Time: 45 - 60 minutes

Students will be able to apply these concepts:

With the last basecamp in ruins after the alien attack, Sphero has set off to
find a suitable location for our new basecamp. Unfortunately, he has found
himself in a bit of trouble - He has plummeted to the bottom of a deep Martian
crater!
The Story:
As nightfall approaches, surface temperatures are dropping rapidly -
Martian temperatures can drop to as low as -184 degrees Fahrenheit! Can
you help Sphero escape the crater before his circuits freeze?
The Mission:
Using any available materials (cardboard, foam meat trays, duct tape, etc.)
engineer a way for Sphero to get out of his Martian crater (small wading pool).
If your team can engineer this feat, how about a 'deeper' challenge? Can
you escape a crater that is deeper and has less room to navigate (5-gallon
bucket)?
https://edu.sphero.com/cwists/preview/1289x

Key Vocabulary

Materials, Resources, and Prep:


Have at least one drone that has been updated to the most recent firmware.
Make sure it is paired with just one tablet and that both the tablet and drone are
fully charged.
https://sphero-media-live.s3.amazonaws.com/cwist/picturesteps/a2/96/Macro%20Mission
%205%20Collapsed%20Martian%20Mine.docx

Activities​:

Day 3: Sphero Arcade

Lesson 1: Get Rolling


Expected Time: 45 - 60 minutes

Students will be able to apply these concepts:


Key Vocabulary

Materials, Resources, and Prep:


Have at least one drone that has been updated to the most recent firmware.
Make sure it is paired with just one tablet and that both the tablet and drone are
fully charged.

Activities​:

1. Roll
2. Aim
3. Heading
4. Collision

Lesson 2: Sphero Pong


Expected Time: 1 - 2 hours

Students will be able to apply these concepts:

Key Vocabulary

Materials, Resources, and Prep:


Have at least one drone that has been updated to the most recent firmware.
Make sure it is paired with just one tablet and that both the tablet and drone are
fully charged.
Activities​:

1. Original Pong
2. Real-World Setup
3. Bounce Angle
4. Back and Forth
5. Keeping Score
6. Winning the game
7. Play the game

Lesson 3: Sphero Bop It


Expected Time: 1 -2 hours

Students will be able to apply these concepts:

Key Vocabulary

Materials, Resources, and Prep:


Have at least one drone that has been updated to the most recent firmware.
Make sure it is paired with just one tablet and that both the tablet and drone are
fully charged.

Activities​:

1. Tap
2. Toss
3. Spin
4. Shake
5. Randomize Game
6. Difficulty Ramp
7. Play the game

Lesson 4: Sphero Pac-Man


Expected Time: 1 - 2 hours

Students will be able to apply these concepts:

Key Vocabulary

Materials, Resources, and Prep:


Have at least one drone that has been updated to the most recent firmware.
Make sure it is paired with just one tablet and that both the tablet and drone are
fully charged.

Activities​:

1. Introduction
2. Simple Controls
3. Scoring
4. Power-Ups
5. Basic Enemies
6. Advanced Enemy
7. Play The Game

Вам также может понравиться