Sorry I haven’t replied yet but I have been away from my computer since my last post. I took some photos for you to look at but they are to large for me to upload to this form to show (they are about 2 to 3 MB in size) you sorry but these links might be able to give you some what of a picture.
The board I am using.
The servo controller
HS-311
HSR-1425CR
The baud rate I am using is 2400 or 4800 with no parity which is what is required for the mini SSC 2 mode.
The problems only start if the HS-311 and HSR-1425CR are both connected at the same time. For instance the two HS-311 will work normally unless I hook up the HSR-1425CR then that is when the HS-311 start to shake if the HSR-1425CR is moving. Also if the HS-311 moves to far to fast (like from 10 to 120) it will trip the HSR-1425CR and cause it to start moving which in turn cause the HS-311 to start shaking.
Here is some Code.
[code]PICAX Code:
No outside control:
main:
serout 7,N4800,(255,1,200)
pause 1000
serout 7,N4800,(255,1,135)
pause 1000
serout 7,N4800,(255,1,60)
pause 1000
goto main:
or
main:
serout 7,N2400,(255,0,0)
serout 7,N2400,(255,1,200)
pause 1000
serout 7,N2400,(255,0,127)
serout 7,N2400,(255,1,135)
pause 1000
serout 7,N2400,(255,0,254)
serout 7,N2400,(255,1,60)
pause 1000
goto main:
Remote Controlled
serout 7,N1200,(255,0,127)
main:
serrxd b0,b1
gosub rotation
gosub elevation
goto main
rotation:
if b2 != b0 then
serout 7,N2400,(255,1,b0)
b2 = b0
end if
return
elevation:
serout 7,N2400,(255,0,b1)
return
Note: 0 is the HS-311 and 1 is the HSR-1425CR
VC++ code
private: System::Void Form1_KeyDown(System::Object^ sender, System::Windows::Forms::KeyEventArgs^ e) {
array<Byte>^ test = {0,0};
if(e->KeyCode == Windows::Forms::Keys::Left){
test[0] = 10;
y = 10;}
if(e->KeyCode == Windows::Forms::Keys::Right)
{
test[0] = 240;
y = 240;
}
if(e->KeyCode == Windows::Forms::Keys::Up && x < 254)
{
x++;
test[1] = x;
}
if(e->KeyCode == Windows::Forms::Keys::Down && x > 0)
{
x--;
test[1] = x;
}
serialPort1->Write(test,0,2);
}
private: System::Void Form1_KeyUp(System::Object^ sender, System::Windows::Forms::KeyEventArgs^ e) {
array<Byte>^ test = {0,x};
if(e->KeyCode == Windows::Forms::Keys::Left || e->KeyCode == Windows::Forms::Keys::Right)
{
test[0] = 135;
}
serialPort1->Write(test,0,2);
}[/code]
I am 95% sure that it is not the code.
Thanks for all the help so far
and I will try to work on uploading those photos.