Pi Wars Week -22: Mixed Success

The Good

Thanks to donations from previous teammates and having the wonderful Hitchin Hackspace on my metaphorical doorstep, I've managed to get a reasonable mockup of part of the Lava Palaver course built and the code I'd written for the challenge seems to navigate it OK, so that should be one challenge I can be confident in at least putting in a respectable performance.

mockup course

There is another section to complete the S-bend, but the paint was still drying on it and I didn't want tyremarks on the board or black paint all over my wheels. This section is at least sufficient to show the bot can navigate a corner in a white line on a black course in an environment full of distractions.

The Bad

I managed to spend about 45 minutes trying to figure out why my bot was hard crashing the Pi every time I tried to drive one of the wheels backwards. Can you spot the not-so-deliberate mistake in this photo?

got a screw loose

My pathological refusal to use locknuts on structural parts meant a nut had come off one of the motor mounts, which let the mount get loose, which let the motor spin in the mounting and eventually one of its terminals came into contact with the other motor. When the motors were turning in different directions, this presumably created a dead short between the two motors which I imagine the motor controller didn't like. The 5V regulator powering the Pi draws its power from the same battery power distribution wires as the left motor controller, so a brownout here would also most likely drop out the 5V reg and power down the Pi. Adding a nyloc nut and cranking down all the other fasteners under the bot sorted out the problem for now, but it's definitely a lesson learned - lock nuts on order, I don't want anything like that happening on the day!