Device booting

Before I continue, I am not sure if this is software or hardware related.

When I use my imp to turn a led on, it turns the led on for 1-5 minutes, then I get this in server log.

26/4/2013 11.45.10: Device booting 26/4/2013 11.45.11: Device configured to be "H.A.Node V0.031a"

the code running on the imp can be found here

Can anyone see why this is happening? If I just let it sit there idle it does not boot.

26/4/2013 12.04.18: Relay 2: closed 26/4/2013 12.05.20: Device booting 26/4/2013 12.05.21: Device configured to be "H.A.Node V0.031a" 26/4/2013 12.06.13: Relay 2: closed 26/4/2013 12.07.22: Device booting 26/4/2013 12.07.22: Device configured to be "H.A.Node V0.031a"

How much current is the LED drawing? How is the device powered? Unless you are current-limiting the load, the imp could be overheating and shutting down, which is why you only see it when the LED is on.

the led is drawing 2.1mA (I think the max current is 4mA for each pin?)

Code looks kinda ok. Does it do the same if you just boot it on a bare april board (nothing connected)?

Maybe change the in checkIn() to a server.log, and add a free memory print to see if somehow it’s running out of memory. I’ve no idea why it would be, but it’s an interesting data point.

I might have found the cause. If I put the led on another pin it does not boot when the led is turned on.

Also if I put a bigger resistor on the original pin the led was on, it also continues to stay on.

So looks like it was because of over current it was booting, but for some reason that pin does not like much more than around 1.5mA, where the other seems to work as expected.

And also, what part of the code looks “kinda ok”? Is it the part where it is doing the actual blinking of the pins?
I know that part of it is a bit clumsy, but haven’t been able to figure out how to use that constructor thing to do it more simple.

The pins are fine with more than 1.5mA, but can you detail a bit more exactly what you’re doing (what’s the forward voltage of the LED, and what resistor are you using), and how the imp is powered?