Activity #33: Motor Control |
Exploring Robotics with the ARX ASURO |
Introduction |
---|
How can we control the movement of the robot? What good is a robot with wheels if we can’t drive it around? We can use programs to control the motors which turn the wheels and make the robot move. In this activity we will learn how to control the motors on the robot. |
BACKGROUND |
How do we control each of the motors on the robot? We have a left and right motor control circuit that we assembled and installed onto the PCB. We saw on the schematic diagram that each circuit was connected to several pins on the microcontroller. You may recall that there is a clever device called an H bridge used with AND gates to provide a stronger signal to generate power to turn the motors. Lucky for us someone else wrote the C code that interacts with the pins and the AND gate, and they developed functions that we can just call when we want to turn the motors on and off. Those functions are in a file called asuro.h that we include with our program. In this lesson we learn how to use those functions to turn on and off the motors, and control their speed. With these functions we can make the robot move forward and reverse and also turn left and right, and stop. |
objectives / outcomes |
By the end of this activity (and the other programming activities) you will be able to:
|
Activity / Process |
Complete these steps.
|
OTHER Resources |
Links to additional materials:
|