Arduino Mega 2560 sending PWM signals to HB-25 motor controller
Alejandro_Baca
Posts: 1
Howdy!
I am working on a project with the Arduino Mega 2560 and I have encountered a problem.
I can send a signal to the motor controller with analogWrite(); but this only sends the motor in one direction.
I know that with pulses shorter than 1.5 microseconds the motor will rotate in one direction.
And pulses longer than 1.5 microseconds will cause rotation in the opposite direction.
So how would I be able to do that with the Arduino Mega?
I have a rough idea that goes something like this:
digitalWrite(13, HIGH);
delayMicroseconds(125);
Am I on the right track?
Help! and Thank you!
I am working on a project with the Arduino Mega 2560 and I have encountered a problem.
I can send a signal to the motor controller with analogWrite(); but this only sends the motor in one direction.
I know that with pulses shorter than 1.5 microseconds the motor will rotate in one direction.
And pulses longer than 1.5 microseconds will cause rotation in the opposite direction.
So how would I be able to do that with the Arduino Mega?
I have a rough idea that goes something like this:
digitalWrite(13, HIGH);
delayMicroseconds(125);
Am I on the right track?
Help! and Thank you!
Comments
There probably is an aurdino funtcion for this.