Can anyone post some c code for driving the s430r using the mini-maestro? I be grateful!!
I have a trianglular shape base that currently has a 2 way moving camera that
can be connected to remotely using opencv (this works), now looking at using 2 continuous motion
servo’s/wheels and a caster ball. I just want something simple for now like move straight ahead, left turn, right turn. I currently push commands remotely thru tcp for camera left/right up/down. having wheels would be fun!! Any sample code would be great, seems it would be similar to the current commands but with a loop, yes/no? thanks!
The commands are the same as sending a servo move command. The effect will be each move will either denote the speed of the rotation and or direction. Usually one range say 0 to 1200 is reverse with speeds fast to slow and 1200 to 2400 with forward and it’s speeds fast to slow. Or any variant of that depending.
so how do you distinguish speed within direction. is it like a 2 byte speed and 2 byte direction of one word in C? thanks for responding btw! g.
The Maestro’s serial protocol is fully documented in the Maestro user’s guide. I recommend that you read the entire “Serial Interface” chapter. At the end of it, you can find example C code for various platforms in the “Serial Example Code” section. This code will work with continuous rotation servos. I recommend compiling and running an appropriate example without modifying it, as a first step.