I built a plotter, and a Python script that generates NXC from an image. The generated NXC looks like this: https://www.refheap.com/paste/6157
It works, but while drawing the 18th line or so, it suddenly shuts down the NXT.
The second time I pressed buttons and kept an eye on the battery, to make sure it doesn't just go to sleep or drain the battery. This is not the case as far as I can tell.
It has been programmed using BricxCC, and the NXT runs version 1.32 of the enhanced firmware.
Is my program too big, or is there a bug in position regulation? I can't think of many other causes.