Shop OBEX P1 Docs P2 Docs Learn Events
Arduino Mega 2560 sending PWM signals to HB-25 motor controller — Parallax Forums

Arduino Mega 2560 sending PWM signals to HB-25 motor controller

Alejandro_BacaAlejandro_Baca Posts: 1
edited 2011-04-20 05:30 in General Discussion
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!

Comments

  • KyeKye Posts: 2,200
    edited 2011-04-20 05:30
    Please try the audrino forums. The HB-25 works as a standard servo.

    There probably is an aurdino funtcion for this.
Sign In or Register to comment.