Added argparse to the main method to get the direction and duration of the motor