I am trying to put a piece of my program in with a time delay. If I get input high for like a full second then the output will go high.
I tried with a long switch debounce, but the output still went high right after the input was there.
{
if (P1IN & BIT3) \\input high
then (delay 2 seconds) \\see if it stays there for 2 seconds
P1OUT |= BIT6; \\ make output high
then (delay 60 second) \\output high for 60 seconds
P1OUT &= ~BIT6 \\reset P1OUT to low
}
Thanks everybody!