Yep, me again. Still playing around with code and want to be able to the following.
Input 1 can be my trigger which is a switch going low when pressed.
Output 2 can be my output which simply turns on an led.
Now the tricky part. If Input 1 goes low once (a single negative pulse) than I want the led to turn on.
BUT if Input 1 is held low for 3 Seconds I want the led to flash instead as this will be a seperate function but still using the same input of course. So the trick is how do I get the picaxe to tell the difference between whether Input 1 is pressed once OR held low for 3 seconds as this is 2 totally seperate functions I am getting the picaxe to try and do here off the same Input only. Is this possible to do? How? Examples please guys. Thanks.
Input 1 can be my trigger which is a switch going low when pressed.
Output 2 can be my output which simply turns on an led.
Now the tricky part. If Input 1 goes low once (a single negative pulse) than I want the led to turn on.
BUT if Input 1 is held low for 3 Seconds I want the led to flash instead as this will be a seperate function but still using the same input of course. So the trick is how do I get the picaxe to tell the difference between whether Input 1 is pressed once OR held low for 3 seconds as this is 2 totally seperate functions I am getting the picaxe to try and do here off the same Input only. Is this possible to do? How? Examples please guys. Thanks.