Arduino Mega and Cmd Skipped issues

I moved my project from an Arduino Uno to a Mega and have had the most difficult time get it to work. Initially I was getting flood error, which probably means my coding is bad, although it was working on the Uno.

Trying to troubleshoot I have gone back to square one and I am still having difficulties. The Mega is setup a an Ethernet shield (Mega compatible) and using the cloud server. I have uploaded the “ButtonInterrupt” example with no modifications other than the token. It runs fine for a while (a few minutes) and the stops and gives me the Cmd Skipped error whenever I press the button. The only way to get it back to work is to upload the sketch again. Tried numerous times and it only works for a few minutes.

@vshymanskyy – any ideas?

This looks very strange and might indicate faulty hardware… Could you try with another Mega/Ethernet shield?
UPD: Also check the power supply/USB cable quality!

Unfortunately I do not have any other Mega boards or Ethernet shields. I have tried the same “ButtonInterrupt” example with the Arduino Uno and it exhibits the same problem. Also tried with an external power supply (not USB) and still the same behavior. Unless it is the W5100 Ethernet shield, I doubt it is hardware related.

I tried other examples and seemed to work fine. I have now rebuilt my sketch and appears to be operating fine. Still, if I use the Interrupt example, the connection freezes.