Asked — Edited

H Bridge Control Without Using A Movement Panel

Hi everyone,

I have scoured the forums and for some reason am drawing a blank on this one.

I have a 12v track actuator connected to an H Bridge and am currently using the Movement Panel to operate it with my Zapper Arm. The actuator has limit switches so I just need it to travel forward and reverse to it's limits.

I need the Movement Panel for another device. Has anyone got a simple script example that I can use in the script manager? I just need to trigger full speed movement with directional control (forward / reverse).

Any help is appreciated.



Upgrade to ARC Pro

ARC Pro is your gateway to a community of like-minded robot enthusiasts and professionals, all united by a passion for advanced robot programming.


Is the current h bridge serially controlled? If so use send serial command followed by port, Baud rate, and speed.

So something like

Sendserial (d2,38400,50) Sleep (500)


Thank you for the quick reply!

I've got the current L298 plugged into the D10 and D11 ports. I'll have to figure out the baud rate, I believe speed would be 255.

Does that makes sense?

Thanks again,



A basic H-bridge is not a serial device so it does not use serial data to drive it... A Sabertooth and Roboclaw are examples of a serial motor controllers.. Here is a tutorial of a standard H-bridge. @dbickert If you are using something else you should post a link to the H-bridge you are using...

H-Bridge tutorial...


Look over the tutorial posted by Richard R, but the basic premise is you turn on the port to drive the motor in a direction. 1 port does one way, the other does the other way. If you have a serial h-bridge(unlikely) you would need to use a uart port if I'm not mistaken. First try to use the Set() command. Here's the exert from the EZ-Script Function.


Set (digitalPort, on/off/true/false) Set a digital port state to either on or off Example: Set(D2, OFF)



If you have a serial h-bridge(unlikely) you would need to use a uart port if I'm not mistaken.

Just for clarity for future, don't take this as me picking on your answer...

  1. He said he has an LN298, so not serial, Rich's tutorial and your instructions for testing are correct.

  2. A Serial H-Bridge does not require the UART. Any digital pin can send serial commands. Only the UARTs can receive serial. Simple serial mode on Sabertooth and Roboclaw are one-way only. No need to receive responses.



Thanks Guys! I'll dig into this tonight.

I appreciate everyone's feedback!



Something not mentioned is that you need to install a pwm control and slide it towords 100 or set the pwm level in your script to get the motor to move. This is mentioned in the tutorial pointed to above.

set the PWM to 100% (or a lower value if you want it slower) - I have mine set to 100% in an init script that is run on successful connection of the EZ-B.