Here is the temporary home for the Autonomous BRAT information while we work on the full tutorial. EDIT: I’m no longer updating this forum thread with updates. We are adding content directly to the tutorial. lynxmotion.com/images/html/build130.htm
Here is the code I’m using to make the BRAT autonomous. It uses a GP2D12 attached pointing forward. There is also a timer going to tell the guy to take a rest every so often. It whistles a little tune when resting. The speaker is used to provide audible feedback between steps indicating if the GP2D12 has detected something. The higher the pitch, the closer an obstacle is. If an obstacle is detected the robot will take one step back and turn two steps to the left, then start walking forward again. The LEDs on the Bot Board II also light indication what behavior the bot is doing. This code is very easy to edit. There are no timing issues as HSERVO and some extra programming by Nathan at Basic Micro runs an SSC-32 emulation in the background. So any sensor can be added in the main control loop. There are 11 sequences already in the program (from the SEQ tutorial) Other sensors we will be adding are an accelerometer so the robot will be able to get up from laying on it’s front, or back automatically.
James is adding some functionality. We added one port from a 2 axis accelerometer so if the guy is turned on when laying on its front or back it will get up. It will also get up if it falls over. Just adding a jumper to the VS line by the AX0 (Pro pin 16) will allow the bot to know when the battery is getting low and beep a tone. This is too much fun! 8)
I built my BRAT a little different, but it should work with the existing code. I have the U channel with the opening facing outward instead of up, and I used the sensor mount to mount the Multi-Purpose Sensor Housing to mount the GP2D12 IR Sensor to the U channel. This allows easily switching to a PING if one wants to do that. This is also the build configuration needed for adding arms.
I built my brat with the U-channel in the same direction as the tutorial. On the front of it I mounted a multi-purpose bracket and a servo and then mounted a multi-purpose sensor housing(or a special purpose bracket for an SRF10), that I had a SRF08 mounted on my brat. Currently it has been moved to the rover and I have an SRF10 that I will put on it…
So maybe I will play with Jim’s code and add some panning into the code.