Watchdog in Arduino Library - or at least support by bootloader

richsp51:
Question: before doing this, is there any harm in testing the sketch you listed on page 1 with my existing bootloader? If my bootloader (by chance) were correct, I would get the results listed on page 2 ,your Reply #22 . If not, what will occur? It won't brick my Mega will it? What happened when you ran with the "bad" bootloader, Reply #20?

First, there are ways around a "bricked" processor, particularly this type of bricking. The problem is that the sketch runs, sets up the watchdog timer, and the watchdog then interrupts the bootloader.

The trick is to not let the sketch run. You power the board off completely, hold down reset, keep holding down reset you apply power (plug the USB cable in). At this stage the sketch hasn't run (you have reset held down). Now with a free hand (this can be the tricky bit) you start uploading a fresh sketch. As it starts to upload you release reset (and not before), and the bootloader kicks in, without having the watchdog timer enabled.

Or, you simply use things like my bootloader uploader to simply replace the bootloader which has the side-effect of erasing program memory, and thus erasing the problem sketch. So you have two ways around it.