In the meantime… If you break your code down to just the servo stuff, can you get it to move? --and if you strip your sonar code down to just the sonar routine, does it work?
A ceramic cap will do just fine and yes, one leg to red, one leg to black.
The other cap would be one of those round ones with the “-” stripe down one side showing you which pin is gnd. This one can go probably near the robot brain or battery --I suppose it doesn’t matter, your bot is pretty small and thus the wires and traces are pretty short --Just install both caps, noting the polarity on the polarized one. Oh, and bigger the better on that big round cap --100uf, 220uf, 470uf or bigger --whatever, just use whatever you have in your parts box.
higher capacity batteries. I know AAA rechareables are typically in the 800mAh range vs AA rechareables being able to get to the 2600mAh range. While it is not necessarily the case, it is something you should look at.
that AAA batteries typically have lower current capacities than AA batteries. According to wikipedia, AAA alkaline batteries offer between 250 and 1200 mAh capacities, whereas, AA batteries supply between 1800 and 2600 mAh worth of capacity.
I don’t know if you have sorted the problems you are having but this may be of some interest. Regarding servos and srf05 by Frits the man himself. Also maybe your range calculation is wrong? have a look at the numbers at that link.
Hello All! I haven’t been on lmr for a looooooooooong time, and I have fixed this problem, but the robot’s server is currently now used in my new robot, Curiosity. Thankjs for your comments on this project I appreciate it.