Somebody said...
also the servos don't have the PCB
What is the model number of the "servo"?
Servos don't work with H bridges, motors do.
Could you use the attachment manager to attach the actual code that does not work.
The code you included is not designed for an H bridge.
I may be wrong, but I think you're doomed from the start here.
H bridges are simply circuits that provide voltage across a motor or other load.
Servos require pulses of different widths to set their positions (see all of those "PULSOUT" commands in the servo control code that you attached). An H bridge doesn't output pulses.
What are you trying to accomplish? Are you simply wanting to learn about H bridges? Or are you replacing the continuous rotation servos with a pair of DC motors? If the latter, you should be able to drive them by connecting the H bridge outputs across the motor terminals, then setting the H bridge's enable pin high, and setting one of the inputs high should turn the motor one way, and setting the other one high should turn it the other way. Remember to set the bridge inputs low again after using them: if they're both high, nothing happens.
Post Edited (sylvie369) : 5/27/2009 11:16:07 AM GMT
The "Roaming with the BoeBot" code puts all of the wheel movement control in subroutines called Forward_Pulse, Turn_Right, Turn_Left, and Back_Up. Once you get your H-bridge working, you just need to substitute the equivalent H-bridge routines for the existing servo routines. The comments in the program describe what these routines do in terms of movement. How you accomplish that with the DC motors and H-bridges will depend on the specifics of what you build.
Get the PDFs from the parallax site on industrial control it might help There are several good instruction PDFs there along with the Nuts and Volts articles on the Parallax products. You can test your H bridge with jumper wires until you understand what you need to do to make it work and then write code to do the same thing.
Comments
Servos don't work with H bridges, motors do.
Could you use the attachment manager to attach the actual code that does not work.
The code you included is not designed for an H bridge.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
www.solarbotics.com/products/gm4/
link to something like the motor
i know the code is not ment for an H bridge
i was asking how to modify the code to work with an H bridge
that was the base code that i had started from
H bridges are simply circuits that provide voltage across a motor or other load.
Servos require pulses of different widths to set their positions (see all of those "PULSOUT" commands in the servo control code that you attached). An H bridge doesn't output pulses.
What are you trying to accomplish? Are you simply wanting to learn about H bridges? Or are you replacing the continuous rotation servos with a pair of DC motors? If the latter, you should be able to drive them by connecting the H bridge outputs across the motor terminals, then setting the H bridge's enable pin high, and setting one of the inputs high should turn the motor one way, and setting the other one high should turn it the other way. Remember to set the bridge inputs low again after using them: if they're both high, nothing happens.
Post Edited (sylvie369) : 5/27/2009 11:16:07 AM GMT
i would be replacing the servos with dc motors
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
i had made the h-brige
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen