Hope this is the correct place to post this query. It's either Electronics or Software. I tend to think its an electronics issue, but...
For a bit of background I'm trying to build the $50 robot. However there are a couple of changes to the basics. I'm using an ATmega168 and Hitec HS-425BB servos. This is mainly due to the fact that both were cheaper to purchase here in Australia than the ATmega8 and the HS-311 (go figure!). I'm programming the 168 with the AVRISPII.
I managed to centre the servos using the following code:
I then had to recharge my batteries (6V 4 pack Alkaline). When I went back to the system The servos started rotating in an anti-clockwise direction. I wanted to change the Speed value to change the direction, but to no avail. The servos still only rotate in an anti-clockwise direction.
My question is: is this to do with the charge of the batteries, the microcontroller clock, or the servos, either because they're not actually centred correctly, or they're rated differently to the HS-311?
As far as I can tell the ATmega168 runs at the same speed as the ATmega8, and I was told there was no real difference between the HS-311 and the HS-425BB.
Sorry about the long post, but any help would be appreciated. Ultimately I will fork out for the correct microcontroller and servos for the project if I have to, but I hope it doesn't come to that.