ezsetup button to change stations

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
Post Reply
highrisc
Posts: 3
Joined: Thu Jul 23, 2009 3:31 pm

ezsetup button to change stations

Post by highrisc »

I have successfully implimented a posting regarding the use of the ezsetup button to change stations. I have soldered to the contacts for the ezsetup button, a switch to run to the outside of the radio. I appear to have a problem with switch bounce where it executes the mpc next command too many times, and the device hangs.
does anyone have a hardware/software solution to resolve this?
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: ezsetup button to change stations

Post by mightyohm »

In hardware, you can play with series resistors and capacitors to ground on the switch lines. There are some examples in this document I found, google will turn up lots of other suggestions:

http://www.ganssle.com/debouncing.pdf

In software, the easiest way would be to alter your code to detect the switch being pressed, wait a short delay, and then check again to make sure the switch is still pressed. This will hopefully make your program more immune to the short glitches in the switch state that occur due to bounce.
Post Reply