if you go to page 6/13 and go to Figure 6 : Bidirectional DC Motor Control. there is a Table on how to give signal to the motor controller and what actually it doesok in the table there are Ven which mean Enable, C and D which is PinA1 and PinA2 respectively. Base on the TableEnable = HIGH,C=HIGH,D=LOW then Motor will run in full speed at one directionEnable=HIGH,C=LOW,D+HIGH then the motor will run at full speed on the other direction Enable=HIGH,C=D, motor will hard stop. Mean that you have a hard time turning the motorEnable=LOW,C&D Dont care(dont mean a thing if left high or low) Motor Flywheel, Essentially the motor is disconnected from the circuit. you can easily turn the motor shaft.

ok lets say driving the motor is the same as driving a car. If we were to pulse only the enable pin, and C and D would be at different state,its an equal to push fully the gas pedal, then release, do this a couple dozen of time and you essentially controlling the speed of the motor, let say that your pulsing the C or D instead of Enable, its like your both your feet is at the brake and the pedal, first your push the gas to the max, then you push the brake to the max. yes you are controlling the motor but, you are wasting allot of energy in that kind of setup.

int Speed=map (pos,posRead, target,255,0); analogWrite (enablePin,Speed); analogWrite (PinA1, 30); analogWrite (PinA2, 180);what does this means.Your actually pulsing all the enable,PinA1 and PinA2. yes the motor will rotate, but there will be time that all the pin would be high and making the motor want to stop. there will also be time that the Enable is low, which make the motor Free wheeling . and there will be time that the motor will rotate to a certain direction. but all and all, i hope you would consider my explanation so you could make the motor run at its optimum speed.

ash901226

yes, i actually learn allot from this project. Usually i would charge you for the service that i gave to you. haha but for you this time it on me, just hope you post that vid you promise as my payment. haha

bluesbud

Ah, okay that makes sense. I was actually using analogWrite initially for the logic pins and digitalWrite for the enablePin in order to slow the motor down, since it was going so fast.

Here's a little video from the other day. More documentation to come in a bit. Might've been my soldering or something, but it kept breaking down during the show. I kept having to restart the programs. Additionally, something happened with the midway feature again.