View Single Post
  #4   Spotlight this post!  
Unread 14-01-2008, 00:35
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: Controller Speed programming

The above two examples don't look like they will work... this code should work copied and pasted (assuming you want your Port 1 joystick to control pwm01):
Code:
if(p1_y > 127) {
  pwm01 = 150;
}

if(p1_y > 200) {
  pwm01 = p1_y;
}

if(p1_y < 127) {
  pwm01 = 104;
}

if(p1_y < 54) {
  pwm01 = p1_y;
}
__________________
What place are we at? ... TODAI!

Last edited by JohnC : 14-01-2008 at 01:19.