View Single Post
  #2   Spotlight this post!  
Unread 15-02-2005, 23:01
incognito_NICK's Avatar
incognito_NICK incognito_NICK is offline
hidden in the corner
AKA: Nick Ferreira
#0179 (Children of the swamp (swampthing))
Team Role: Programmer
 
Join Date: Nov 2004
Rookie Year: 2002
Location: palm beach gardens
Posts: 15
incognito_NICK will become famous soon enough
Send a message via ICQ to incognito_NICK Send a message via AIM to incognito_NICK
Re: Programming motors with joystick buttons

you have the right idea about using an if statment.

what you can try is something like this:

Code:
if(p1_sw_trig==1)
{
   pwm01=254;
  }
else if(p1_sw_top==1)
{
   pwm01=0;
   }
else
{
 pwm01=127;
 }