Probably just a really bad case of switch bounce. Try adjusting the delay something like this;
That might do it. If not place this same code at the bottom just before it returns to Main.Code:WHILE !SwitchPin PAUSE 50 ' adjust this until it starts acting right. WEND
You could also increment a variable in the WHILE loop. When it reaches a certain value it will indicate approx how long the switch was held down.




Bookmarks