Let's code the robot to lift different loads
Let's start coding this forklift. You will be using all three of the robot's motors for the first time, which is going to be quite exciting.
Activity #1
Mark the initial position of your load base, as well as the forklift robot. Ensure there's at least 30 cm distance between them and try to keep them in a straight line. Now, program your robot to move forward until it reaches the load. The robot must stop so that the forks go underneath the load base. Try to use rotations-based programming for the drive motors for accuracy. Please use the given space to write the algorithm.
Now that you are there, you need to pick up this load. To do so, you will have to move the load motor so that it is connected to port C. As you may recall, you can program your motor so that it moves for a few seconds. We discussed this in Chapter 2, Building Your First BOOST Robot – Tabletop Fan, and Chapter 3, Moving Forward/Backward...