How to use the Set Volume To Block in LEGO SPIKE Prime Word Blocks Software
A big part of a sound is its volume. Here's how to change it!
- #2501
- 16 Sep 2025
A big part of a sound is its volume. Here's how to change it!
The force sensor can detect how hard it’s being pressed! Here’s how:
Did you know that your hub can play a sound? Here's how!
Did you know that your hub can play a sound? Here's how!
Have you ever wanted to program your favorite music on SPIKE Prime? Here's how!
You already know how to do division in mathematics - here’s how to do it in SPIKE Prime!
Did you know you can use the motors as sensors? Here's how!
Did you know you can use the motors as sensors? Here's how!
So far, we’ve explored a line-following algorithm commonly referred to as duck walking. Let’s take a closer look at how it works and consider how many distinct states it actually involves.
In more advanced robotics programming, your robot may need to respond in three or more different ways depending on sensor input. Up to this point, we've created programs with only two possible outcomes using a switch block: a condition is checked, and the robot performs one action or the other based on the result.
But what if the robot needs more than just two responses? To handle this, we can use multiple conditions—often implemented with nested switch blocks or structured decision chains. In this section, we’ll explore how to build programs that go beyond binary choices and enable your robot to react intelligently to more complex environments.
When you hear the task “program the robot to follow a black line,” you’ll most likely imagine a program that works like this:
The main takeaways from today's lesson are how to alternate between following a line and performing other actions needed to complete the basic level of the line-following challenge, and how to plan your program ahead of time. Today's program will serve as a foundation to build upon for solving more advanced line-following challenges.

PID is the most popular method for programming line-following robots. It’s a bit complex, so this tutorial is longer, as we’ll break it down into steps and explain each element of the equation.
This approach to programming line-following robots is not ideal for beginners. Attempting to learn this as a first step in competition preparation may give a misleading impression of the competition's complexity and could discourage students from learning the necessary skills to compete in this category.

Wheel condition plays a crucial role in the performance of any robot, so it’s common practice to maintain your robot before testing and especially before a competition. Here are some steps you can take to ensure that any variations in the robot’s performance aren’t due to the wheels:

While "multistate line following" can describe a variety of algorithms, this tutorial will cover its implementation using the ducky line-following method.
This is the most basic line-following method, commonly known as the "ducky" line-following method.
Line following is a very common competition category. Here's how you can get started with it!
Here's one way to program using a color sensor!
What is a color? How does our robot detect it? Learn that here!