Fortunately, the main drive motor control was easy to design. Most of the work is done by the L9110 Motor Control Driver. Power is supplied by the onboard battery (7.2v 3300 mAh). GPIO pins 16 (GPIO4) and 18 (GPIO5) provide motor control. Direction is controlled by the GPIO4 level (High == Clockwise, Low == Anticlockwise) and speed is controlled by a PWM signal on GPIO5 where a High == off, PWM == speed.
Code to follow….