Set pinMode in Motor class and use fields instead of passing a struct in Robot class.
Major refactoring: Dont pass struct to Robot class, simplified code.