Thread: Pointer to pwm
View Single Post
  #2   Spotlight this post!  
Unread 06-02-2008, 00:24
JohnC's Avatar
JohnC JohnC is offline
my other name is nigel
FRC #0360 (360 Revolution)
Team Role: Programmer
 
Join Date: Mar 2005
Rookie Year: 2005
Location: user_routines.c
Posts: 100
JohnC is a jewel in the roughJohnC is a jewel in the roughJohnC is a jewel in the roughJohnC is a jewel in the rough
Send a message via AIM to JohnC
Re: Pointer to pwm

We use Left(int) and Right(int)
Code:
void Left(int speed) {
  pwm01 = speed;
  
  if(pwm01 > 254) {
    pwm01 = 254;
  } else if(pwm01 < 1) {
    pwm01 = 1;
  }
}
And the right one assigns 254-speed. Just yet another form of abstraction
__________________
What place are we at? ... TODAI!