Flowcode Demo Switch debounce

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
Bobw
Posts: 157
Joined: Sat Jan 22, 2011 10:39 pm
Location: Michigan
Has thanked: 6 times
Been thanked: 27 times
Contact:

Flowcode Demo Switch debounce

Post by Bobw »

I managed to write a small program to count up or down depending on the push button that is pressed. The delay for de-bouncing, is this more for when running the simulation than actual practice? I already have a small delay in the program so that the count does not go crazy when clicking the button with the mouse.

Bob

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Flowcode Demo Switch debounce

Post by medelec35 »

When I use a delay for switch debounce, I place delay so that there is only a delay after switch press has been detected.
That way, rest of program is not slowed down if no switches are pressed.
Change the delay to suit.
I believe it would be best to keep a delay of some value in practice, since as switches get older, bounce gets worse.
Attachments
Switch_Debounce FCV4.fcf
(7 KiB) Downloaded 732 times
Martin

Post Reply