|
Serial communication between RC's
We are making a hexapod robot. There are 6 legs with 3 servos on each leg. This requires 18 pwm outputs. Unfortunately, an RC only has 16. Our solution to this is to send a string of PWM values through a serial cable to another RC and have that slave RC output PWM values.
We have connect the two RCs with a serial cable and we have a null modem between them. We have tested with and without the null modem.
The baud rates are both set to 115200.
In our master RC, we call Write_To_Serial_Port_One() and in our slave RC we call Serial_Port_One_Byte_Count() and Read_Serial_Port_One().
We cannot retrieve the data sent by the master to the slave.
Our program has been simplified to the master continuously sending out '@' on each iteration of Default_Routine() and our slave turns on a light on the OI if it receives that character.
The master is definitely writing the '@' because I can see it show up on the terminal on my computer. Therefore, the problem must be that the slave isn't reading it.
Any ideas?
Thanks in advance.
|