I'm close. So close. Last night I managed to get functional code working. He could roll around the arena, turn around if he hit the line around the edge, and charge if he saw a target. Phase 1 complete.
The bot was still pretty dumb at that point though. There was a noticeable lag in reaction time when he needed to turn from the edge, and that sometimes led to partial out of bounds. Not good. Also, it only sensed objects directly ahead.
So today, I refined the existing code. I have the old stuff to fall back on, so I almost started with a total re-design. The sonar sensor was mounted lower on the servo, since I expect my opponents to be a bit shorter then me. I also have it sweeping around successfully, and steering the bot in the general direction of a detection, solving (kind of) the "tunnel vision" issue.
When I tested the newest code out tonight, I realized another issue. If an object (target!) was within an inch or two of the sonar, such as when in a charge, it could loose track of them, and the bot would turn away to look again. So I did what I swore I wouldn't do until after the competition: I added MORE SENSORS!
The large plate I was planning to use as a pusher/armor in the front still hadn't been mounted. I have decided I'm going to add a pair of small pushbuttons behind the plate, and if either is pressed, the bot will forgo all other activities, and push as fast as it can straight ahead until it sees the line or the button is released. I tested this with a crappy bench rig, and wrote some code. I think it'll work pretty well. The plate also provides the advantage of keeping the optical sensors in a consistent light. That should help keep the readings steadier in varying conditions this weekend.
He looks angry. Probably because I'm rushing so much of this build. Although I have to say, I'm pretty proud of myself so far. I'm not normally this productive in this short a time. I guess it's good to have a goal.