How to use Absolute Value in LEGO SPIKE Prime Word Blocks Software
It is part of the Functions block, but what does it do?
- #2509
- 16 Sep 2025
It is part of the Functions block, but what does it do?
Due to the long construction, you need to be careful with time in this lesson. Don’t let the students spend too much time building. If you think you can manage it, you may let them find their own sheet music and adapt it, but we recommend sticking to the short section from Ode to Joy as shown in the tutorial. This melody also serves as preparation for the next lesson, where a ready melody will again be needed. Here’s what the program looks like:

Because this is the musical level, it’s important to set some rules for the sounds the robots make. Students often don’t realize how loud it can get, so remind them to keep the volume lower so they can hear the hubs, and to stop their programs in time, since continuous sounds can become quite loud.
In this lesson, students will learn many of the key concepts needed for the rest of the course. That’s why there is little construction and mainly exploration with a single force sensor. Make sure they understand the difference between pitch and volume. Although there are many new blocks introduced, they are mostly simple and similar to previous ones. These blocks will also be used in many future lessons, giving students plenty of time to become familiar with them. By the end of the lesson, students should have tried the following two programs:


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!
What Is a Hall Effect Sensor?
A Hall Effect Sensor is a small electronic component that detects magnets. When a magnet comes close, it sends a signal to other devices, like an Arduino or an LED light. Think of it as a tiny switch that turns on whenever a magnet is nearby.
If you don’t rotate an object around its center of mass, it becomes unstable - causing vibrations, extra stress, and sometimes complete system failure.

You’ve probably seen a spinning fan or display with LED lights that forms text or images in mid-air — it looks like magic! But what’s really happening?
This amazing effect is based on a concept called Persistence of Vision (POV). When an LED strip spins fast enough and its lights turn on and off at just the right times, your brain blends those quick flashes together. The result? You see a complete image - even though it’s really just a single line of lights moving in circles!
What is a Capacitor?
A capacitor is an electronic component that stores electrical energy in an electric field. You can think of it like a tiny rechargeable battery, but it charges and discharges much faster and can’t hold energy for very long.
Why Are Voltage Regulators Important?
They protect components from getting too much or too little voltage.
They keep the power supply stable.
They make electronic devices more reliable and last longer.
Tools & materials needed for drilling.
Step-by-step drilling technique.
How to keep yourself safe in the process.

Here, we’ve listed all the tools and skills you need to solder and desolder components using THT (Through-Hole Technology).

Before you connect wires in your project, you need to take off the plastic covering (insulation) at the ends so the metal wire is exposed. This is called stripping the wire. You can do it with a wire stripper or even with simple tools you may have at home.
In the image below, you'll see where to connect the power source and the motor to the motor speed controller.