I have an Arduino-based project I've been working on that uses an Arduino Mega2560 with an Ethernet Shield. The basic idea is that the Arduino polls a set of sensors and then streams their values over the ethernet network back to a laptop.
I've built 4 units and they all work fine. However, today I built the same basic setup but used an Arduino Ethernet (no shield) to try to simplify the hardware. The sketch I've used with no problems on the other units works for awhile on the new board but then randomly freezes after 20-30 seconds. The reset button does not reset the board; I have to actually pull the power and reattach for it to start up again.
Do I have a defective board, or are there subtle differences between using the standalone Ethernet vs the Ethernet Shield?
I went back through to check the memory usage for any leaks, and to comment out any long string constants, etc. but still saw the freezes. Then it occurred to try something simple -- I loaded the "Blink" sketch and sure enough, after 30 seconds or so the LED stops blinking and the board won't respond to the Reset switch. So I'm thinking it's a probably a defective board.
Thanks, though, for pointing out the RAM issue -- that was not something I had considered but will in the future!