Now that you have created your H-Bridge driver circuit and connected your motors, let's run the code that will make the motors spin.
There are two files for this section, and they can be found in chapter10/motor_class.py and chapter10/motor.py. Run the code found in chapter10/motor.py and your motors will turn on, change speeds, and change direction.
Place a piece of tape on the shaft of your motors to make it easier to see when they rotate and in what direction.
When you have confirmed that your circuit works with the example code, we will next proceed and discuss the code. Since the L293D can drive two motors, the common code has been abstracted out into motor_class.py, which is imported and used by motor.py to drive our two individual motors.
We'll start by looking at motor.py.