the Arduino offical example of detecting INPUT signal