Society of Robots - Robot Forum

Software => Software => Topic started by: microzee on March 30, 2014, 11:09:05 AM

Title: [Arduino] Controlling a self modded continuous servo [Solved]
Post by: microzee on March 30, 2014, 11:09:05 AM
Hello, so a while back I built the 50 dollar robot, but decided to use something a little more usable so I bought the arduino. The problem I'm having is controlling my servo. I followed the 50 dollar robot guide, I bought a hs 311 and opened it up and cut the stuff glued etc. Now on my arduino, I want to be able to control the servo speed/direction. In the 50 dollar robot guide it says this:

Send PWM to the servo. You will notice that by telling the servo to go to a particular angle, instead it will rotate at a particular speed. Neat, huh?

So in the arduino IDE I send a particular angle to the servo. Guess what? it rotates at one speed no matter what I send it (direction sometimes changes). Also there's no way to stop the servo.

see this:
http://arduino.cc/en/Reference/Servo (http://arduino.cc/en/Reference/Servo)

I might need to set:
servo.attach(pin, min, max)
min max values?

The other weird thing is right when I attach the servo without even writing any data to it, it starts spinning. Maybe when I modded it the pot wasn't at 0?

Solved -  The pot wasn't in the right position.
Title: Re: [Arduino] Controlling a self modded continuous servo [Solved]
Post by: MrWizard on April 26, 2014, 01:04:46 PM
Thanks for the feedback.