View Single Post
  #22   Spotlight this post!  
Unread 17-03-2004, 23:00
adventrx327's Avatar
adventrx327 adventrx327 is offline
Registered User
no team
 
Join Date: Mar 2004
Rookie Year: 2003
Location: ""
Posts: 19
adventrx327 is on a distinguished road
Send a message via AIM to adventrx327
Re: Help! Programming question with triggers

Here is how i would write it if i were you guys....

if ( 0 != p3_sw_trig)
{
pwm07 = 175;
pwm08 = 175;
}
else if (0 != p3_sw_top)
{
pwm07 = 90;
pwm08 = 90;
}
else
{ pwm07 = 127;
pwm08 = 127;
}


When writing my code i didnt do p3_sw_top == 1, my mentor sez its better to do 0 !=, and i have no idea why.

try this, if it works yay! if not sorry i couldnt be of more help