A short application to test your arduino mega and detect if there are very thin short or cold solder joints between the pins/connectors. Useful if your buttons are not detected for example (we had a defective board with a short between pin 10 and 11, disabling SRIO function scanning the buttons).
Simply upload the sketch and then with a single wire you can monitor through Serial at 115200 bauds that the pin is good : pin 13 is the output pin alternating a state 1/0 while Serial indicates if the tested pin is working. All pins are tested so you can pass from one pin to another with the monitor window opened without rebooting, simply by moving the wire.
pin10 is tested on the picture below :
Increase the delay(5) to delay(150) to see the source output pin blinking. Sketch to download :