Fixed Motor class constructor to take the pin the motor will be on as a parameter