I bought my son a junkbot for his Christmas http://robotbits.co.uk/robot-kits/junkbot-kit/prod_97.html Which he successfully built after we got a faulty I/O shield replaced. It runs fine with the test software and we can make small changes successfully. However when we make the programme more than a couple of lines longer it stops obeying the programme. It runs through the first few manoeuvres then appears to restart the program from the beginning. For a long time I've assumed this was a software issue (a bit embarrassing as I'm a software engineer) and I periodically take another look. However recently I accidentally connected it through the USB port while the batteries were still in it. Suddenly it ran beautifully, I could see the wheels obeying all the commands whenever I held my hand in front of the sensor. I put it on the floor and chased it round the room with the laptop and it still works great. Obviously I've done some more tests now, replaced the batteries with new ones etc. and the outcome is. Battery only: it does not complete the command sequence, but resets to the start USB only: as above. Battery+USB connected:It does exactly as designed.
I'm not sure which forum area this belongs in, but please can someone help.