How and why to reset motors before start for LEGO Education SPIKE Prime Pro Preview

Every time we start the robot we want to start from the same place, not only in terms of where we are on the field but also in terms of how are the motors rotate. The motors have an internal sensor for detecting the rotation. Because of this they know how rotated they are. It is a very good practice to always reset the motors before we start a competition run especially at FIRST LEGO League or World Robot Olympiad competitions

  • #1949
  • 10 Aug 2022
  • 6:03

How to use this tutorial

Experiment with resetting the motors. Make sure you reset the motors regularly, preferably at the start of every round

English

As one of the last tutorials in the course, we'll take a look at something that we didn't have a chance to discuss. And this is this small markers here. What's their purpose? Why are they here? And you can see we have them on the motors and we also have them on the wheels. And the goal of this tutorial is to discuss how do we reset the motors and why we need to reset the motors. We have this LEGO Education SPIKE Prime robot, and we have two motors. And we also have two small motors, two large motors. And on the motors, you see these grey markers, which means that when both markers are next to each other, the motor is at zero degrees, which is important when we want to use the sensor inside of the motor to detect how many rotations has the motor made, that's quite important. And it's important before the start of every run to reset these markers to be next to each other. And we can do this in a couple of ways. First, we can do it by hand, or we can develop a program. When we develop a program, we start the program. And what you can see is that we reset the motors so that the markers match. They are next to each other. And in this position of the motors, we are at zero degrees. And this gives us a chance to build more reliable and consistent robot, which is the goal after all. Here. How do we program the LEGO Education SPIKE Prime be more reliable and consistent so that we can have more fun with them. Instead of struggling and trying to find ways to make them work. For the wheels, there are also markers. And take your robot. See where the wheels are and how the marker is manufactured. And it's like a small dot. Let's turn them again to them. Okay, one random position. Start the program,

and we reset both motors. The reason why we want to do this is, again, to start from the same place every time. Don't forget to do this with your robot. We enter into smaller details with the program, and let's see how the program works. On my left, we have the program, and on the right, we have a recording of the behavioral of the robot. When the program starts, we will do the following thing. We will set the speed to motors A-B-C and D, which are the four motors that we have on this LEGO. Education SPIKE prime percent. Now, during competition, probably we want to set it to a different value. But we found that 10% is quite okay, especially for the demonstration. And what we want to do is we want to use this block that says Motor A go shortest path to position zero, which is resetting the model. And the block is right here. And we can also direct it to go to other positions. And we've used this block with other tutorials. Here we just want to reset it right before we start it for the new run. And we want to do the same thing for all the four motors. We ask the motors we program the motors to move to position zero from the shortest part. And this is how it works. We start the program.

First motor, position zero. Second motor, position zero. Third motor. That's it. A-B-C and D. What we have next, set relative position to zero. Again, a block that we want to use to say that AHA, now that we have gone to this position, we are at this position, which is kind of a duplication, but it makes sense when you think about it. You want to go to the shortest path to position zero, but you probably are not position zero because you might have some attachments. And then you want to set the relative position that this is zero. It doesn't matter. What matters is that when we want to have a consistent and reliable behavior of the robot, we should reset the position of the motors. And to reset the positions we use go shortest path and then set relative position to. And in this way, the robot, the motors, they start from the same position every time. Now, this concludes one of the last tutorials in the course. And the next tutorial will be about how do we arrive at a specific location on the field, how do we reach specific position using everything that we have learned up until now. Moving, aligning, following, detecting clients. Moving with the gyro sensor. This is something for some of the next tutorials in the course. See you in the next tutorial.

Courses and lessons with this Tutorial

This Tutorial is used in the following courses and lessons

Image for LEGO Education SPIKE Prime Programming for competition with Word Blocks
  • 40
  • 188:21
  • 19
Image for Reset motors before start
  • 1
  • 0
  • 0
  • 3d_rotation 1