Shop OBEX P1 Docs P2 Docs Learn Events
Slow, power hungry robot? — Parallax Forums

Slow, power hungry robot?

NoBo780NoBo780 Posts: 94
edited 2007-11-05 02:09 in BASIC Stamp
I am trying to program in subsumption-based FSM program architecture (in PBASIC for the BS2e), and I am getting relatively frustrated at the results. I have taken someone's code (credit to: J2R scientific) and manipulated it to suit my needs. But I have two versions of the code, and quite frankly, I don't think either is working the way it is supposed to. The program titled "Source Code" runs faster than the program titled "J2SubSumExplore". Why? Also, how come my robot is not moving smoothly, but instead, jerking? Is it too much sensory input, and has to be timed correctly? If so, how? This FSM structure can be very confusing! Secondly, note the 'commented out' GOSUB's sound_1, sound_2, and sound_3. I CANNOT seem to get it to play them just ONCE after sensing it is in a dark room. Instead, it flashes the LED (pin 11), and continuously loops the sounds while it is in the dark. If I comment out the sounds, the LED stays lit. What do I do? I have been looking at these problems for what I thought was every angle, but I guess I'm wrong...? Thanks!!

A GREAT text on Subsumption-Based FSM Program Architecture can be found here: http://www.bluebelldesign.com/Robot%20Subsumption%20DLC.pdf

ADDED 11/6:

Another problem comes with this. I realized that if I shortened the PAUSE's in the program, the wheels will rotate more often (but still not continuously...), but this uses up a LOT of power, because I put in 4 fresh AA's, and 20 minutes later, they were down to 1.4V each which is about when it restarts and starts to act erratically. I would add pics, but we just moved and our digital camera chargers are packed. If it helps, the robot has two Sharp GP2D12 IR sensors, a Ping))) ultrasonic rangefinder, one 3V white LED that turns on in the dark, an RCTIME circuit (with a CdS Photocell) that has to get a breif 5V charge to the capacitor every time the BS2 reads it (every few milliseconds), two parallax continuous rotation servos, and or course, the BS2e. (it is all on a Boe-Bot chassis)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Giggly Googley!

Post Edited (NoBo780) : 11/6/2007 7:00:30 PM GMT
Sign In or Register to comment.