View Single Post
  #2   Spotlight this post!  
Unread 09-02-2004, 22:08
Ryan Cumings's Avatar
Ryan Cumings Ryan Cumings is offline
Programmer and University Rejected
#0134 (Team Discovery)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Pembroke, NH
Posts: 65
Ryan Cumings is an unknown quantity at this point
Send a message via AIM to Ryan Cumings
Re: Mapping Buttons to PWMs

In a bit of pseudo code

Code:
if(p1_sw_trig) {
   // When we hold down the button do this
   pwm08 = 200;
}
else {
   // When we are not holding down the button, do this
   pwm08 = 127;
}