Newbie Question: Make a servo turn 90 degrees and stop.

Interesting about the "servo"...

How about I control the postion as stated in one of the comments.

I have a pair of these fellas on an educational robot platform (diy). They work great. I’m sending ‘microsecond’ commands from an Arduino – rather than angular commands – as it offers higher resolution.
1000uS is full speed forward
1500uS is STOP
2000uS is full speed reverse
…anything in between gives a proportional speed. Very handy.
Cheers

How about I control the postion as stated in one of the comments.

You have no positional feedback from that device unless you add your own potentiometer, or somehow enable the one that has been disconnected.
That comment relates to the fineness of control using the "writeMicroseconds" method instead of "write"

nizer:
Interesting about the "servo"...

How about I control the postion as stated in one of the comments.

I have a pair of these fellas on an educational robot platform (diy). They work great. I’m sending ‘microsecond’ commands from an Arduino – rather than angular commands – as it offers higher resolution.
1000uS is full speed forward
1500uS is STOP
2000uS is full speed reverse
…anything in between gives a proportional speed. Very handy.
Cheers

First you will need to learn to be a technical reader. Where in the material you quoted is the word "position" found? For a quick answer, the servo you have cannot be set to a "position". It has been modified such that you can only control the rotation speed and direction.

Time to chalk it up to experience, and buy a proper servo.

Eureka!!!

This is the right idea...This moves the "servo" 90 degrees then stops it.

Sorry about the confusion over the servo. I assumed the fact that it was sold as a servo it would be one. Never thought of buying a kitchen sink, that looks like kitchen sink and is labeled as such, would turn out to be a wheel barrow when I got it out of the box :slight_smile:

#include <Servo.h> 
 
Servo myservo;  // create servo object to control a servo 
                // a maximum of eight servo objects can be created 
 
int pos = 0;    // variable to store the servo position 
 
void setup() 
{ 

   myservo.attach(9);  // attaches the servo on pin 9 to the servo object 
   myservo.write(180); //starts servo moving as fast as it can go CCW
   delay(400); //waits for the server to move
   myservo.write(90); //stops the servo
} 
 
void loop() 
{ 
  
  }

The problem with that code is, as the battery fails (as it will, rapidly), the amount of time the servo takes to turn 90 degrees will change.
This may or may not be important to you.

will I get 40 minutes out of a 9 volt?

needs to only turn once!

Can I just plug in a solenoid on the same pins as + and - that the servo used on the ardunio and have they trigger?

Probably not?????

A proper servo will only cost a few dollars from a good model shop.

nizer:
will I get 40 minutes out of a 9 volt?

needs to only turn once!

Why do you keep asking this question? People have posted their opinions on using a 9v battery. If you want to use a 9v battery, no one is going to stop you. Any reason you can't just try it yourself? :roll_eyes:

Sorry to "keep asking" . My goal was to have a system that I don't have to recharge. I have not gotten the BT part working yet and was about to solder the battery wires on. I can easily get a 9 volt at all the theaters I work at, but from what I am getting from you and the forum, I should not use a 9 volt and use 4 AA batteries. Hopefully that will power it for the time I need.

Thanks for posting and I apologize for my ignorance. I have not posted here before and this is all new to me.