Thread: Pointer to pwm
View Single Post
  #3   Spotlight this post!  
Unread 07-02-2008, 15:57
bronxbomber92 bronxbomber92 is offline
Registered User
FRC #1551 (Grapes of Wrath)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Naples
Posts: 75
bronxbomber92 is an unknown quantity at this point
Re: Pointer to pwm

Quote:
Originally Posted by eagle33199 View Post
that seems like an OK way to do it... what might end up being easier, though, is to just do something like:

#define leftMotor pwm01
#define rightMotor pwm02

then you can use your left and right motors wherever you want, and if someone plugs something in backwards and doesn't want to unplug it you just have to change it in the one location in the header file. Just another option to consider!
That's what I have currently, and I've debating if I should use a more OO approach, which I'm still not sure of. Just brain storming