View Single Post
  #3   Spotlight this post!  
Unread 01-12-2004, 20:15
stephenthe1 stephenthe1 is offline
Registered User
#1008
 
Join Date: Dec 2004
Location: Ohio
Posts: 113
stephenthe1 is on a distinguished road
Re: pwm ouput limiting

Quote:
Originally Posted by Joshua May
If I understand you correctly, then this should work. I can't remember the exact two-joystick code, but this concept should be valid.

Code:
if (p1_sw_top)
{
  pwm01 = p1_y + 4;
  pwm02 = p2_y + 4;
}
if (pwm01 > 138)
  pwm01 = 138;
if (pwm02 > 138)
  pwm02 = 138;
thanks for the help. by the way, I meant 238, not 138. (just stating that cause I feel dumb ) no matter, thanks for the help