Hi Bruce, I have tried that.. but when I hold the switch down.. the output of the LEDs is not stable, it jumps to the NEXT LED lets say that I want to stop the program when the LED is 35% on .. when I have the switch pressed the LED seems to jump to full brightness .. and when I release it the LED comes back to where I wanted to stop it. How do I avoid that from happening..
but when I take the while statement out of the program, the entire switch works but the flag does not refresh.. then the nest time I would have to press the switch multiple times to make it stop.. it;s very unpredictable.
I even included the a resister between VCC to the Pin and then PIN to GROUND I have the switch. i dont think that my configuration is wrong is it?
Hope there is another solution to this
srigopal
Bookmarks