I already pointed out your problem in the other post that you made
You need to review Section 2.4 of the free KINDLE sample of my Arduino book
In summary:
-
Your Pressure device is an I2C device, so just follow the Adafruit instructions. This device got nothing to do with the BT UART Port Serial2(), nor with the DXL Port Serial1(), nor with the Serial Monitor tool Serial() (i.e. the USB Port of the OpenRB-150).
-
To set up the Serial Monitor tool (i.e. Serial()), use either Serial.begin(57600) or Serial.begin(115200) and DO NOT FLIP-FLOP the baud rate for Serial() within your sketch.
-
To set up the RC100 protocol onto Serial2(), use the following statements:
#include <RC100.h>
RC100 Controller;
Controller.begin(2); // meaning that you want Serial2() to act as an RC100 device.
Also as all ROBOTIS BT-210/410 modules are set to 57600, so all RC100 devices are also set at 57600, meaning that your sketch does not need to set up baud rate for Serial2() - see the file RC100.cpp and you can see the actual code for Function RC100::begin() - please see Fig. 2.7 in the Kindle sample or enclosed picture below:
Please check your own RC100.cpp to see the code is the same or not.
- To use the DXL Port (i.e. Serial1()) for the OpenRB-150, the setup should be as follows:
#include <Dynamixel2Arduino.h>
#define DXL_SERIAL Serial1
const int DXL_DIR_PIN = -1;
Dynamixel2Arduino dxl(DXL_SERIAL, DXL_DIR_PIN);
dxl.begin(1000000); // as ROBOTIS actuators are usually set for 1 Mbps.
You need to keep track of which Serial Port you are using and for which purpose, if not you won’t go very far with Arduino.