Let's Make Robots!

Dagu Adventure / Mr.General - Is "turn on all the servos" an error of some sort?

So I've gotten my Dagu Adventure Bot running and have successfully been putting code on it.  I've turned off the sound, I've played around with the "light chase" mode and edge detection sensors, and so on.  So I'm pretty confident that the code I see is the code that's making it down to the bot.

Here's the weird thing.  Whenever I run the out of the box code, with nothing commented out?  Almost immediately the robot's head whips around until it is tucked down and to the right, and then it tries to go into some sort of spin.  I don't know much about the mechanical bit of what's going on but it seems to suddenly go all "Drive all the servos to the max". It is unclear to me whether it's gone to the max position and stopped, or if it is actually attempting to drive past its limits and potentially break itself. When it gets like this it seems to be ignoring the sensors, and no amount of trying to get my hand in front of the head will make it leave this position.

Is there any sort of error condition that might cause this as an expected behavior?  I've not yet found anything in the code that would make it do this -- all the movement routines seem wrapped in a combination of "only move X amount at a time", and "make sure you don't go past the defined range for this motor."

I am working my way through the code systematically to determine if this is in fact something the code is telling it to do.  If I turn off the wheel motors completely, I can never make it do just the head thing.  

Is such an error even a possibility? Where, despite my code saying "Turn the motor off", they are all still powered?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Definitely using NiMh batteries, I did my reading before hand and didn't want to screw it up :)

The CD I received came with a manual for the Adventure Robot, and an arduino-0018.zip file.  But inside the Zip there's a whole bunch of lower level examples and libraries, but nothing like the Adventure_Robot.pde file (and associated headers) that I was able to download.  So, I've been using that.

Upon further investigation I think that the "down and to the right" problem might indeed be a valid response where the bot gets stuck chasing its tail, only in this case it's trying to get away from itself.  It seems its own sensor light as an object and then tries to back up away from it, but of course the light follows it and it looks like an infinite loop.  That's just a guess based on what I'm seeing.  I noticed that when I moved the bot from my crowded desk (where who knows what might have been triggering the edge sensors) out to the wide open rug, the behavior almost went away (but I can still cause it).

Refresher on current status and what I'm trying to do : Out of the box the robot behaved in what I'd consider to be a very cool way, doing that "turn your head and follow the object in front of you" thing that I'd seen in the demonstration video.  However, after updating for the first time with the downloaded version of the Adventure_Robot.pde (with no changes other than turning off the sound to avoid upsetting my coworkers), it behaved radically differently, failing to follow an object like it used to, and going into these tail chasing spins.  So it seemed to be a case where the downloaded code is different from what was originally on the robot.

Right now I'm tweaking on a bunch of variables to try and get it back to something resembling what it did out of the box, before I go trying to do anything fancy.

This is intended as a gift for my kids, but I want to fully understand what it does and can do, and why it's doing it, before I let them at it.