Академический Документы
Профессиональный Документы
Культура Документы
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.
Day 1:
Lesson 1: Ice Breakers 1
Expected Time: 45 - 60 minutes
Key Vocabulary
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.
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:
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:
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
your first lines of JavaScript code. This is a great activity if you want to jump
Key Projects:
Key Vocabulary:
Function:
Argument:
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!
2. Hello Line!
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
Key Vocabulary
Code Block {}: These blocks represent programming concepts and can be attached to create
programs.
Command/Function:
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
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.
Func onReady() {
// set stabilization to false
while (true) {
const accelTest = // add accelerometer calculation here
// 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.
6. Reflection
questions:
Lesson 5: Variables
Expected Time: 1- 2 hours
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
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:
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?
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
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.
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
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
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
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.
Key Vocabulary
Activities:
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
Activities:
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
Activities:
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
Activities:
Activities:
1. Roll
2. Aim
3. Heading
4. Collision
Key Vocabulary
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
Key Vocabulary
Activities:
1. Tap
2. Toss
3. Spin
4. Shake
5. Randomize Game
6. Difficulty Ramp
7. Play the game
Key Vocabulary
Activities:
1. Introduction
2. Simple Controls
3. Scoring
4. Power-Ups
5. Basic Enemies
6. Advanced Enemy
7. Play The Game