brian cavanagh

Counter while button is low (FRDM-K22F)

Discussion created by brian cavanagh on Nov 30, 2017
Latest reply on Nov 30, 2017 by brian cavanagh



I was looking through the "Components Library"  for a timer but didn't find what I thought would work so I'm looking for some help.


What I'm trying to do is create a counter while a button is pressed (held low).  

If the button is held low for longer than (or equal to) 2 seconds, carryout the remaining code that will follow.


If the button is held low, less than 2 seconds, do nothing and reset the counter.


Can someone help me with this?