OpenRB-150 Serial port help

I am trying to use the serial1 port (Pin 13) on the RB-150 to read sbus packets. The code works fine when using an MKR1010 but does nothing when using the RB-150
What am I doing wrong?

That is because the OpenRB-150 is already using Serial1 to control the DXLs and Pins D13/D14 are hooked up to Serial3

image

You can also read the free Kindle Sample of my Arduino book for more details if needed

https://read.amazon.com/sample/B0BPXGQ6YX

Thank you so much!! So just use Serial3…Makes sense

Tried it last night and had no luck using serial3 for pin 13. Also tried setting up Serial2 with the open headers and had no luck. Do I need to set up the Sercoms for the ports?

Not sure why not? You keep on mentioning D13 only. But I always needed 13 and 14 to complete UART Comm. out of Serial3. Also I needed 3.3 V and ground to make my BT-210/410 to work.
That free Kindle sample has lots of details about using UART with Serial3. I had not used S-bus comm before so I can’t comment anything specific about it.

Serial2 is strictly wired to those 4 “holes” near the VIN/DXL jumper block and they connect directly to a BT-210/410 module from Robotis once you solder in the proper connector. On the 2 regular GPIO headers you can use Serial4 and Serial5 and you do need to setup the Sercomms for them. All spelled out in that Kindle sample.

Still having no luck. Do i need to include the Dynamixel2Arduino library?

Most definitely!
Can you share your Arduino code? And your physical setup of the OpenRB-150?

This code works fine on an MKR1010

#include “sbus.h”
#include <Dynamixel2Arduino.h>
#include <actuator.h>

/* SBUS object, reading SBUS /
bfs::SbusRx sbus_rx(&Serial2);
/
SBUS object, writing SBUS /
bfs::SbusTx sbus_tx(&Serial2);
/
SBUS data */
bfs::SbusData data;

void setup() {
/* Serial to display data /
Serial.begin(115200);
while (!Serial) {}
/
Begin the SBUS communication */
sbus_rx.Begin();
sbus_tx.Begin();
}

void loop () {
if (sbus_rx.Read()) {
/* Grab the received data /
data = sbus_rx.data();
/
Display the received data /
for (int8_t i = 0; i < data.NUM_CH; i++) {
Serial.print(data.ch[i]);
Serial.print(“\t”);
}
/
Display lost frames and failsafe data /
Serial.print(data.lost_frame);
Serial.print(“\t”);
Serial.println(data.failsafe);
/
Set the SBUS TX data to the received data /
sbus_tx.data(data);
/
Write the data to the servos */
sbus_tx.Write();
}
}

I have not used “sbus.h” so I can’t tell you much about the two SBUS Objects you have created sbus_rx() and sbus_tx(). But I can tell that you are associating Serial2 to them.

For the OpenRB-150 and from the free Kindle sample of my book, I already suggested to use Serial3 instead and therefore Pin D13 (RX) and Pin D14 (TX) to connect to your SBUS device. And I understand that you already swapped out Serial2 for Serial3 in the programming but that did not work for you. I had been using Serial3 only as a UART port, so I also had to cross-wire TX and RX lines (Pins D13/D14) and the TX/RX lines of my UART device: does this cross-wiring apply to your SBUS device?

Also, from my working with the OpenRB-150, you need to begin() Serial3 at a certain baud rate before you can use it. Do you know what is the baud rate on your SBUS comm. line? What does the SBUS function Begin() do? Does it set up some kind of default baud rate? Assuming that it is 57600, then my suggestion is to try to insert the following statement as the first statement in setup()

Serial3.begin(57600);

to see if Serial3 would then be working with your SBUS devices better?

If that fails too, you may have to ditch the OpenRB-150, go back to the MKR1010 and then buy the MKR DXL Shield which should work with your MKR1010 to control the DXLs via Serial1 and Pins D13/D14 and thus leave Serial2 alone for your S-Bus comm. needs like you used to have them? Check out link below:

You can seat the MKR1010 on top or below the MKR DXL Shield.