Run arduino code to drive a motor direction and speed to be controlled by extern

Hi,

I have two brush less motors. I drive them using an arduino board connected with a duinotech motor driver circuit. Now, I want the direction and speed of motors to be controlled by an external variable. For example, imagine the variable is defined in a C program. When, it is set I need to perform the rotation of motors clockwise and when it is zero, I want it to be anti-clockwise.

I am clueless about how to do it.

Are you using a motor control library, or have you rolled your own code?

For receiving the data on the Arduino have a look at Serial Input Basics

This Python - Arduino demo may also give you some ideas. The techniques can be implemented in any PC language.

...R

duinotech motor driver circuit.

Can you please provide a link to this device so that we can see what you are using.

Ar_ani16:
I have two brush less motors. I drive them using an arduino board connected with a duinotech motor driver circuit.

Details please...which Arduino board? what motors? what "duinotech motor driver"? Links to motor and driver specifications please.

Apart from anything else I don't know of many "motor drivers" that will drive brushless motors, and certainly not in both directions.

And let's see the code you are currently using to drive these motors, with information about what it currently does.

Steve