View Single Post
  #3   Spotlight this post!  
Unread 09-02-2004, 22:09
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: Mapping Buttons to PWMs

say you want the trigger to set pwm3 to 200 when pressed, 127 when not:

if(p1_sw_trig) pwm03 = 200;
else pwm03 = 127;

any of the button status variables will work in the if statement.

--edit--
lol, apparently ryan and I are both forum hawks
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)