The 'Module' channels are single-ended serial (UART), but to provide robustness over the Ethernet cable, they are converted to a differential signal (RS-485) onboard the state machine. Modules at the receiving end need to convert RS-485 back to single-ended UART. For Arduino and Teensy, we provide shields (1
) to accomplish this task with a single IC
. In both cases, the channel in the Arduino IDE is 'Serial1'.
One way to solve your problem is to control Teensy 3.2 with the Teensy Shield. Then, write a simple Arduino sketch that reads any incoming bytes from the state machine on Serial1, and writes them to Serial2 (pins 9, 10 on Teensy) or Serial3 (pins 7,8). You can initialize Serial2 and/or Serial3 at any baud rate you need. A sketch for Teensy3.2 similar to the one you need is in the Bpod_Gen2 'Examples' folder, here
. It's an 'Echo Module' that sends incoming bytes back to the state machine. In your case, you'd route them to Serial2 instead, and include Serial2.begin(115200); in the setup() funciton. One advantage of this approach is that you may not need to transmit every byte from the state machine - if the serial protocol of the device you're trying to control has more complicated commands, you can make a library of commands in the Teensy and reference them by index. Note that if you have State Machine r2, you won't need a USB cable to power the Teensy once it's programmed - the state machine supplies power over the Ethernet cable if you connect Teensy to module ports 1-3.
I hope this helps!