My best suggestion would be to include the led going low after a short time out in the loop. While this may lead to a slight blink in the led while the button's pressed, you can controlling how long it stays on from each test.
Otherwise you need to throw some logic in there to check if it's high already before setting it high some more. Debounce. It could be stacking 20 high commands up in the queue.
Void
If button on and led off
led on
Elseif button off and led on
led off
End loop
--
NOTICE: This list is OBSOLETE. For details about the replacement TriEmbed list go here:
http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
---
You received this message because you are subscribed to the Google Groups "trianglearduino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to triangleardui...@googlegroups.com.
Visit this group at http://groups.google.com/group/trianglearduino.
For more options, visit https://groups.google.com/d/optout.