I had cause to have a closer look at some Arduino inputs – it is that fascinating weather station again. It transpires that some Arduino inputs are better at tolerating slowly-changing inputs than others. For example, ATmega328P (Figure 13-2, Arduino Uno and Nano) and ATmega32U4 (Figure 10-2, Arduino Leonardo, Micro or Pro Micro) Arduinos have hysteresis …
This story continues at Not all Arduino inputs are equal – hunt the Schmidt trigger
Or just read more coverage at Electronics Weekly