|
The sequence is as follows:
1. PC sends 1 arbitrary byte to tell the RC to get ready to receive.
2. RC sends back 1 byte and waits for 8 bytes in the receive buffer.
3. RC sends its data packet back.
The baud rate matches the default that IFI uses, which is 19200, 8 bits, no parity, one stop bit.
Write your PC client so that it reads the joystick and sends one byte to the RC. On the RC side, just grab the value in the recieve buffer whenever data is waiting and write it to a PWM output with a servo attached. Once you get that working add the rest. You have to make sure that the code running on the PC during step 2 is tight enough that the RC isn't sitting there waiting.
The program is written in VB 6.0 with the MSCOMM control as the serial interface. I'll make the source available when I have time to clean it up.
|