

How to use the Division Block in LEGO SPIKE Prime Word Blocks Software
You already know how to do division in mathematics - here’s how to do it in SPIKE Prime!
- #2495
- 16 Sep 2025
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:
From programs that rely entirely on proportional line following to those that use a PID-type program where "P" stands for the proportional line following component, proportional line following has proven to be a core mechanic in line following competitions.
Here, we discuss the effects of applying this method to the two-state duck-following algorithm.
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.
Следването на линия е много често срещана състезателна категория. Ето как можете да започнете в него!
Here's one way to program using a color sensor!
Какво е цвят? Как нашият робот го вижда? Научете това тук!
Чудили ли сте се дали вашият робот може да взема решения? Ето как можем да го направим!
Чудили ли сте се дали вашият робот може да взема решения? Ето как можем да го направим!