You can use interrupts for this. But you will need to connect the button to specific pins on the Arduino. If you are using the Arduino Uno ... ... <看更多>
Yes, absolutely, it should work. But your code will be easier to read if you use some constants, like: const unsigned long SECOND = 1000; const unsigned ... ... <看更多>