If you’ve been following along with my Spike Prime tutorial series, you will know that a couple weeks ago I presented a “first challenge” for kids just getting started using a Spike Prime robot. That challenge was simply to learn how to use the Spike Prime coding word blocks to learn how to drive their robot to a new location. This week’s challenge is very similar, but now we are going to avoid an obstacle. This means this week we are focusing on being intentionaly with our turns.
As long as you didn’t make your target destination directly in the line of sight of your robot’s starting position, you will have had some practice turning already. However, at least when my kids did the first challenge, they were taking random stabs in the dark regarding how many rotations to turn the wheels to get it to point in the right direction. This second challenge will give them another opportunity to think about how the robot responds to turn commands.
Also, if, like my kids, your children solved the first challenge by adjusting individual motors using this Motors blocks, this week also gives them an opportunity to play around with the built in driving functions within the Movement blocks.
For your reference, here are all the Challenge posts I’ve either written or am planning to write soon! Hopefully I will come back and update as I go. Sign up for my newsletter to be notified when new content is available!
- Spike Prime Challenge 1: Moving to a Square
- Spike Prime Challenge 2: Avoiding an Obstacle (*this post*)
- Spike Prime Challenge 3: Pushing an Object
- Spike Prime Challenge 4: Using a Distance Center for Navigation
- Spike Prime Challenge 5: Knocking Over a Tower
- Spike Prime Challenge 6: Lifting a Square
Spike Prime Challenge: Avoiding an Obstacle Details
Recommended Age Range: Elementary, Middle School, High School
Time Required: This took my kids about 20 minutes, but it could be more or less!
Difficulty: Easy to Medium
Cost: The LEGO Education Spike Prime Set costs $400 on the LEGO site. As of this writing, it is more expensive on Amazon, but I would check to compare!
If you still have the squares set up from the first challenge, Moving to a Square, you can use the exact same starting point and target destinations. If not, then simply make a square the same size as your robot to launch your robot from. (It is important that the square is small enough that you will set your robot down in the same spot oriented the same way each time.)
Then make a square that is bigger that your robot is aiming to land in. As I mentioned last time, make a smaller square to make the challenge more difficult and a bigger one to reduce frustration. I only require that my kids barely touch the square to succeed.
Now, whichever way your kids drove for the first challenge, you will want to place an obstacle in the way so that their first program will no longer work. My kids drove straight and then turned the first time, so I put the obstacle in front of their car’s starting position. You can use whatever you want for the obstacle, but the big yellow bin that the spike prime comes in makes a great option! Once kids are able to complete this challenge, they should be able to navigate any sort of maze.
Now, here is an important point that I’ve learned from working with my own children. File management does not come easily to kids. As a programmer, keeping all of my programs organized and named in a way that I can understand later is a crucial part of my job. Kids, on the other hand, are happy to keep working in the same file indefinitely and leave it named “Untitled 1.” This is something that they have to be trained out of.
I would let them know when they start doing this challenge that they have two options. The first is to select New Project from the Home Menu.
If they go this route, then make sure they:
- name their file something that make sense.
- select Word Blocks.
I had my kids repeat “word blocks” so many times that I don’t think they will ever forget that step. I can tell my youngest feels particularly empowered with this piece of confident knowledge. Of course, if you would rather them code with Icon Blocks or Python, then choose that instead. I feel like Word Block are the perfect place to start.
The second option, which might be a good idea if the kids were happy with their solution to the first challenge, is to start with a duplicate of that program. To start, click on My Projects. The click the upper-right corner of the program you want to duplicate and select duplicate.
A new copy of that program will appear with “1” added to the end of the file name. Click the upper right corner of the box and rename your file.
Now you can just click on this file to open it and start modifying it meet the new challenge!
There is, of course, more than one way to solve this particular challenge. You could take the scenic route around the yellow bin or try to get to the target square as quickly as possible. To start, you will want to place your bin in such a way that it blocks your path from the first challenge and also does not allow you to just turn and draw a straight line between the starting square and target square.
This is where I put my yellow bin:
Next, I just changed the sequences of turns and moving forward commands from the first program in order to navigate around the bin. This is what I came up with:
In the last program, drove straight and then turned. This time, I turned first to avoid the obstacle, drove straight, and then turned again to direct myself back towards the final destination.
Good luck! 😊