Generally when people are using a button or sensor with similar types of contacts, there is some "bouncing" due to the switch contacts and thus a pull-down (or up) resistor and capacitor may be used. However this can often not be the optimal solution, especially when trying to minimise the parts used - or someone may have forgotten to include hardware de-bouncing in the design. This leads us to investigate a small Arduino sketch example by Instructables user "delphino-999", who has devised a way of de-bouncing using interrupts.
It's a clever solution and leaves room for adjustment to take hardware factors into account. To run through it yourself, click here for the example. And for more, we're on twitter and Google+, so follow us for news and product updates as well.
If you're an experienced Arduino user and interested in more advanced Arduino topics such as interrupts and hardware design - get yourself a copy of "Practical Arduino" by Jonathan Oxer and Hugh Blemings:
Create your own Arduino-based designs, gain an in-depth knowledge of the architecture of Arduino, and learn the easy-to-use Arduino language all in the context of practical projects that you can build yourself at home. Get hands-on experience using a variety of projects and recipes for everything from home automation to test equipment. For more information and to order, click here.