using a motor instead of a servo!

I want to use a 3.5v motor with the arduino and a potentiometer, in the library there is code for a servo and potentiometer which chooses which direction it goes im wondering if you can do this with a motor instead of a servo, im asking on here because a servo has 3 connections and a motor has 2??? :-?

D.J.B.,

you're doing it again. You ask questions without providing any useful data and without bothering to try to understand what you want to do. The way you ask your questions, the answer is very simple:

No, it's not possible to do this the way you want to do. The Servo library won't control you the motor you describe, just like a hammer won't be able to wash your socks.

However, there are many things possible to do what you want, but after all the answer you got in your other threads you chose to ignore, I won't bother to go into. If you want to solve your problem, work on the problem instead of asking inane and annoying questions on the forum.

How?

Start out with looking for a way to make your motor move. This is achieved by first understanding what kind of motors exist and which you have. For this, use Google and don't post senseless questions.

After this you need to understand how your type of motor can be controlled and best try it out on your motor if what you thing is necessary works. For this, again use Google and your motor and don't post senseless questions.

The next step is how have the Arduino control your motor. As you already know exactly what type of motor you have and what kind of control you need, you'll find on Google easily very detailed instructions how to proceed and what additional components you're going ta need. Again, there's no need to post senseless questions on the forums.

If you now have all your kit together and all pieces before you, you can build your motor control. In case you run into trouble here, posting a specific question with a list of the components you use and a description what works already will help. This is the first time where posting on the forums will achieve something beside annoying people.

Once the control of the motor work in hardware you can start on the software to control the motor.

As a last step, you can look into how to attach a potentiometer to your Arduino and how to work with the values read. That's pretty easy and there's a tutorial available on Arduino.cc which explains it very well.

As a last step, you integrate your two pieces of software and get what you want.

Now off you go and do something useful.

Korman

A word of warning: don't be tempted to attach your motor to an output pin of your Arduino.

http://itp.nyu.edu/physcomp/Labs/DCMotorControl

That's what you want.

cool! :)

Servo uses one digital output. A motor needs 2 bi-directional high current motor driver outputs (probably using an external driver chip).

The other two connections on the servo are simply power (4.8-6v nominal) and ground.

Mowcius