Serial Servo Controller + Arduino HELP!
pbohm
Posts: 2
I am trying to control the Parallax Servo Controller with an Arduinoboard, but those little guys won't obey my orders...
So far I got everything hocked-up (Servos are "twitching" every time I reset the controller, so I guess the hardware is set up correctly?!). When I send serial data from the Arduino the green LED on the controller is flashing, so that seems to be alright, too. My serial monitor shows this data to be sent: 53 43 01 00 00 03 0D (!SC ch1 ramp0 pw 300 CR).
The code looks the following:
Serial.print(33, BYTE); //!
Serial.print(83, BYTE); //S
Serial.print(67, BYTE); //C
Serial.print(1, BYTE); //channel 01
Serial.print(0, BYTE); //rampspeed 0
Serial.print(0, BYTE); //LSB for the pw 0
Serial.print(3, BYTE); //MSB fot the pw 3
Serial.print(13, BYTE); //CR
I am sending everything with 2400 Baud and I've tried it with a pull-up resistor and without.
... but the thing is not moving.
So if anybody has an idea why not please help me out!
Thank you very much
So far I got everything hocked-up (Servos are "twitching" every time I reset the controller, so I guess the hardware is set up correctly?!). When I send serial data from the Arduino the green LED on the controller is flashing, so that seems to be alright, too. My serial monitor shows this data to be sent: 53 43 01 00 00 03 0D (!SC ch1 ramp0 pw 300 CR).
The code looks the following:
Serial.print(33, BYTE); //!
Serial.print(83, BYTE); //S
Serial.print(67, BYTE); //C
Serial.print(1, BYTE); //channel 01
Serial.print(0, BYTE); //rampspeed 0
Serial.print(0, BYTE); //LSB for the pw 0
Serial.print(3, BYTE); //MSB fot the pw 3
Serial.print(13, BYTE); //CR
I am sending everything with 2400 Baud and I've tried it with a pull-up resistor and without.
... but the thing is not moving.
So if anybody has an idea why not please help me out!
Thank you very much
Comments
See if the following doesn't work a bit better:
··· Serial.print(33, BYTE);· //!
··· Serial.print(83, BYTE);· //S
··· Serial.print(67, BYTE);· //C
··· Serial.print(49, BYTE);· //channel 01
··· Serial.print(48, BYTE);· //rampspeed 0
··· Serial.print($00, BYTE);· //LSB for the pw 0
··· Serial.print($03, BYTE);· //MSB for the pw 3
·······
··· Serial.print(13, BYTE);· //CR<!--StartFragment -->
I have used the "$" above to indicate a HEX number above, and below. That may need to be changed based on the particular computer·language you're using. All other numbers are DECIMAL.
If that doesn't work, I would attempt to use the following:
··· Serial.print(33, BYTE);· //!
··· Serial.print(83, BYTE);· //S
··· Serial.print(67, BYTE);· //C
··· Serial.print($01, BYTE);· //channel 01
··· Serial.print($00, BYTE);· //rampspeed 0
··· Serial.print($00, BYTE);· //LSB for the pw 0
··· Serial.print($03, BYTE);· //MSB for the pw 3
Regards,
Bruce Bates
@Bruce: for a moment I thought you had the right idea, but somehow (unless I remember wrong) this code only managed to set a "default" position for all channels to about mid. and this won't change no matter what ever I change in the code.
oh btw, quick responses guys, thanx
Any more ideas?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shawn Lowe
Maybe I should have waited to do that......