Create MotorClass

# I am a beginner and really have no idea how this git system works.
# However, since I got a lot of help from this project
# I would like to share some codes

The Motor Class is a class I modified for Cherokey 4WD mobile platform (from DfRobot)
The original link is here:  http://www.dfrobot.com/wiki/index.php/Cherokey_4WD_Mobile_Platform_(SKU:ROB0102)
It has four DC motors with left two and right two motors moving together

This class can be copied into Arduino/arduino.py, then instantiated in your python program.


Example:

from arduino import Arduino
from arduino import Motor
import time

    
ar=Arduino()
motors=Motor(ar)
    
time.sleep(2)
motors.advance()
time.sleep(2)
motors.stop()
time.sleep(0.01)
    
motors.turnleft()
time.sleep(2)
motors.stop()
time.sleep(0.01)
        
motors.turnright()
time.sleep(2)
motors.stop()
time.sleep(0.01)
    
motors.backoff()
time.sleep(3)
motors.stop()