As ever I am the voice of dissent: never write software to solve a hardware problem. For a double-throw switch the classic solution is an SR latch. Single throw is actually harder. On the face of it, debounce is a trivial matter done with a capacitor and a pull-down (or pull-up) resistor. This will certainly stop floating and false positives from induced ...


Interrupts are not the right place to handle priorities. The interrupt handlers should be as short as possible. Then the likeliness of two of them happening at the same time is very low. And even if it happens, the lowest-priority interrupt will only be delayed by a handful of microseconds, which should not be a big deal. In this case, the sensible approach ...


The regualator of that 5V Blew up or the diode you need to read the schemtics of the Arduino Uno and check the circuits. https://www.arduino.cc/en/uploads/Main/arduino-uno-schematic.pdf

Only top voted, non community-wiki answers of a minimum length are eligible