I have a hexapod that I bought that came with an elechouse 32 channel servo controller. My goal is to get this thing going with a wireless PS2 controller and a arduino mega 2560 micro controller. But so far I can't even get the legs to move properly.
I have searched on the internet about this controller and there is not much out there. These are the links that I have found and the resources I have.
The forum post that I have put here has the pdf file controller manual for more information as well.
What I have attempted:
I hooked up with a single wire, the TX/RX pins from the mega to the servo controller TX/RX pins.
I hooked up the RX/TX with both the grounds on the servo controller to the same ground as the mega.
I hooked the ground of the servo power input to the mega ground.
I hooked up the RX/TX 5V pins to the 5V pin on the mega.
As for programming, I have a very strong programming background. Especially in C#. But have dabbled many times with arduino language and C++. So I am pretty sure I have this correct and I understand whats going on with my code. And for the most part have used the code example from the LMR forum post I linked above. I have tried many different versions with the example code trying to get the leg to move but nothing has worked. I can get the legs to move, but its random legs with random rotations at random times. Especially if I touch and untouch the grounds from the mega to the ground pins of either RX/TX pins of the servo controller.
move(6, 950, 500);
move(6, 750, 500);
void move(int servo, int pos, int time)
This is pretty much the example code from the LMR forum post. I have tried setting the pin modes of the megas serial 1 TX/RX pins to input and output and that did not work either. I am pretty new to robotics and not too experienced but know that I can get this if I just get a little help. :D
Any help is appreciated. I am to the point that I am thinking about just not using this servo controller board that came with this hexapod and replacing it with something else. If it comes to that, any suggestions?