>while(btn_on != btn_off) //wait for btn press
I get this tingly sensation that you should be using braces for this loop. That is, of course, if you want both conditional statements to be a part of the loop. If you only care about the first conditional, you're okay.
>if (btn_on = 1) //btn on pressed
Are you really sure you want to assign 1 to btn_on here? This is usually a bug where people mean to use == for comparison.
>if (btn_off = 1) //btn off pressed
Ditto.
Last edited by Narue; Jun 18th, 2007 at 11:14 am.
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Offline 11,807 posts
since Sep 2004