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.