Skip to content

Commit 7e29368

Browse files
author
Kei
committed
packed structure, added master raw APIs, added OpenCM9.04 setDxlMode()
in SerialPortHandler.begin(), modified examples comment for OpenCM9.04
1 parent 90ad884 commit 7e29368

File tree

25 files changed

+73
-43
lines changed

25 files changed

+73
-43
lines changed

examples/advanced/add_custom_SerialPortHandler/add_custom_SerialPortHandler.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
#define DEBUG_SERIAL soft_serial
2525
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
2626
#elif ARDUINO_OpenCM904 // Official ROBOTIS board with DXL circuit.
27-
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (To use the DXL port on the OpenCM 9.04 board, you must use Serial1 for Serial. And because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.)
27+
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
2828
#define DEBUG_SERIAL Serial
29-
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (To use the DXL port on the OpenCM 9.04 board, you must use 28 for DIR PIN.)
29+
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
3030
#elif ARDUINO_OpenCR // Official ROBOTIS board with DXL circuit.
3131
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
3232
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78

examples/advanced/bulk_read_write_raw/bulk_read_write_raw.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
#define DEBUG_SERIAL soft_serial
2525
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
2626
#elif ARDUINO_OpenCM904 // Official ROBOTIS board with DXL circuit.
27-
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (To use the DXL port on the OpenCM 9.04 board, you must use Serial1 for Serial. And because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.)
27+
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
2828
#define DEBUG_SERIAL Serial
29-
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (To use the DXL port on the OpenCM 9.04 board, you must use 28 for DIR PIN.)
29+
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
3030
#elif ARDUINO_OpenCR // Official ROBOTIS board with DXL circuit.
3131
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
3232
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78

examples/advanced/operating_mode_advanced/operating_mode_advanced.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
#define DEBUG_SERIAL soft_serial
2525
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
2626
#elif ARDUINO_OpenCM904 // Official ROBOTIS board with DXL circuit.
27-
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (To use the DXL port on the OpenCM 9.04 board, you must use Serial1 for Serial. And because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.)
27+
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
2828
#define DEBUG_SERIAL Serial
29-
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (To use the DXL port on the OpenCM 9.04 board, you must use 28 for DIR PIN.)
29+
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
3030
#elif ARDUINO_OpenCR // Official ROBOTIS board with DXL circuit.
3131
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
3232
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78

examples/advanced/read_write_ControlTableItem/read_write_ControlTableItem.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@
123123
#define DEBUG_SERIAL soft_serial
124124
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
125125
#elif ARDUINO_OpenCM904 // Official ROBOTIS board with DXL circuit.
126-
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (To use the DXL port on the OpenCM 9.04 board, you must use Serial1 for Serial. And because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.)
126+
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
127127
#define DEBUG_SERIAL Serial
128-
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (To use the DXL port on the OpenCM 9.04 board, you must use 28 for DIR PIN.)
128+
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
129129
#elif ARDUINO_OpenCR // Official ROBOTIS board with DXL circuit.
130130
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
131131
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78

examples/advanced/slave/slave.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
#define DEBUG_SERIAL soft_serial
2525
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
2626
#elif ARDUINO_OpenCM904 // Official ROBOTIS board with DXL circuit.
27-
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (To use the DXL port on the OpenCM 9.04 board, you must use Serial1 for Serial. And because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.)
27+
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
2828
#define DEBUG_SERIAL Serial
29-
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (To use the DXL port on the OpenCM 9.04 board, you must use 28 for DIR PIN.)
29+
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
3030
#elif ARDUINO_OpenCR // Official ROBOTIS board with DXL circuit.
3131
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
3232
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78

examples/advanced/slave_callback/slave_callback.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
#define DEBUG_SERIAL soft_serial
2525
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
2626
#elif ARDUINO_OpenCM904 // Official ROBOTIS board with DXL circuit.
27-
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (To use the DXL port on the OpenCM 9.04 board, you must use Serial1 for Serial. And because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.)
27+
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
2828
#define DEBUG_SERIAL Serial
29-
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (To use the DXL port on the OpenCM 9.04 board, you must use 28 for DIR PIN.)
29+
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
3030
#elif ARDUINO_OpenCR // Official ROBOTIS board with DXL circuit.
3131
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
3232
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78

examples/advanced/sync_bulk_raw/sync_bulk_raw.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
#define DEBUG_SERIAL soft_serial
2525
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
2626
#elif ARDUINO_OpenCM904 // Official ROBOTIS board with DXL circuit.
27-
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (To use the DXL port on the OpenCM 9.04 board, you must use Serial1 for Serial. And because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.)
27+
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
2828
#define DEBUG_SERIAL Serial
29-
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (To use the DXL port on the OpenCM 9.04 board, you must use 28 for DIR PIN.)
29+
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
3030
#elif ARDUINO_OpenCR // Official ROBOTIS board with DXL circuit.
3131
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
3232
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78

examples/advanced/sync_read_write_raw/sync_read_write_raw.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
#define DEBUG_SERIAL soft_serial
2525
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
2626
#elif ARDUINO_OpenCM904 // Official ROBOTIS board with DXL circuit.
27-
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (To use the DXL port on the OpenCM 9.04 board, you must use Serial1 for Serial. And because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.)
27+
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
2828
#define DEBUG_SERIAL Serial
29-
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (To use the DXL port on the OpenCM 9.04 board, you must use 28 for DIR PIN.)
29+
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
3030
#elif ARDUINO_OpenCR // Official ROBOTIS board with DXL circuit.
3131
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
3232
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78

examples/basic/baudrate/baudrate.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
#define DEBUG_SERIAL soft_serial
2525
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
2626
#elif ARDUINO_OpenCM904 // Official ROBOTIS board with DXL circuit.
27-
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (To use the DXL port on the OpenCM 9.04 board, you must use Serial1 for Serial. And because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.)
27+
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
2828
#define DEBUG_SERIAL Serial
29-
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (To use the DXL port on the OpenCM 9.04 board, you must use 28 for DIR PIN.)
29+
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
3030
#elif ARDUINO_OpenCR // Official ROBOTIS board with DXL circuit.
3131
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
3232
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78

examples/basic/current_mode/current_mode.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
#define DEBUG_SERIAL soft_serial
2525
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
2626
#elif ARDUINO_OpenCM904 // Official ROBOTIS board with DXL circuit.
27-
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (To use the DXL port on the OpenCM 9.04 board, you must use Serial1 for Serial. And because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.)
27+
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
2828
#define DEBUG_SERIAL Serial
29-
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (To use the DXL port on the OpenCM 9.04 board, you must use 28 for DIR PIN.)
29+
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
3030
#elif ARDUINO_OpenCR // Official ROBOTIS board with DXL circuit.
3131
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
3232
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78

examples/basic/current_position_mode/current_position_mode.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
#define DEBUG_SERIAL soft_serial
2929
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
3030
#elif ARDUINO_OpenCM904 // Official ROBOTIS board with DXL circuit.
31-
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (To use the DXL port on the OpenCM 9.04 board, you must use Serial1 for Serial. And because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.)
31+
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
3232
#define DEBUG_SERIAL Serial
33-
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (To use the DXL port on the OpenCM 9.04 board, you must use 28 for DIR PIN.)
33+
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
3434
#elif ARDUINO_OpenCR // Official ROBOTIS board with DXL circuit.
3535
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
3636
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78

examples/basic/id/id.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
#define DEBUG_SERIAL soft_serial
2525
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
2626
#elif ARDUINO_OpenCM904 // Official ROBOTIS board with DXL circuit.
27-
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (To use the DXL port on the OpenCM 9.04 board, you must use Serial1 for Serial. And because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.)
27+
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
2828
#define DEBUG_SERIAL Serial
29-
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (To use the DXL port on the OpenCM 9.04 board, you must use 28 for DIR PIN.)
29+
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
3030
#elif ARDUINO_OpenCR // Official ROBOTIS board with DXL circuit.
3131
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
3232
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78

examples/basic/led/led.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
#define DXL_SERIAL Serial
2222
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
2323
#elif ARDUINO_OpenCM904 // Official ROBOTIS board with DXL circuit.
24-
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (To use the DXL port on the OpenCM 9.04 board, you must use Serial1 for Serial. And because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.)
25-
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (To use the DXL port on the OpenCM 9.04 board, you must use 28 for DIR PIN.)
24+
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
25+
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
2626
#elif ARDUINO_OpenCR // Official ROBOTIS board with DXL circuit.
2727
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
2828
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78

examples/basic/operation_mode/operation_mode.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
#define DEBUG_SERIAL soft_serial
3535
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
3636
#elif ARDUINO_OpenCM904 // Official ROBOTIS board with DXL circuit.
37-
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (To use the DXL port on the OpenCM 9.04 board, you must use Serial1 for Serial. And because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.)
37+
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
3838
#define DEBUG_SERIAL Serial
39-
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (To use the DXL port on the OpenCM 9.04 board, you must use 28 for DIR PIN.)
39+
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
4040
#elif ARDUINO_OpenCR // Official ROBOTIS board with DXL circuit.
4141
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
4242
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78

examples/basic/ping/ping.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
#define DEBUG_SERIAL soft_serial
2525
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
2626
#elif ARDUINO_OpenCM904 // Official ROBOTIS board with DXL circuit.
27-
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (To use the DXL port on the OpenCM 9.04 board, you must use Serial1 for Serial. And because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.)
27+
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
2828
#define DEBUG_SERIAL Serial
29-
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (To use the DXL port on the OpenCM 9.04 board, you must use 28 for DIR PIN.)
29+
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
3030
#elif ARDUINO_OpenCR // Official ROBOTIS board with DXL circuit.
3131
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
3232
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78

examples/basic/position_mode/position_mode.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
#define DEBUG_SERIAL soft_serial
2525
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
2626
#elif ARDUINO_OpenCM904 // Official ROBOTIS board with DXL circuit.
27-
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (To use the DXL port on the OpenCM 9.04 board, you must use Serial1 for Serial. And because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.)
27+
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
2828
#define DEBUG_SERIAL Serial
29-
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (To use the DXL port on the OpenCM 9.04 board, you must use 28 for DIR PIN.)
29+
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
3030
#elif ARDUINO_OpenCR // Official ROBOTIS board with DXL circuit.
3131
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
3232
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78

examples/basic/profile_velocity_acceleration/profile_velocity_acceleration.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
#define DEBUG_SERIAL soft_serial
3030
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
3131
#elif ARDUINO_OpenCM904 // Official ROBOTIS board with DXL circuit.
32-
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (To use the DXL port on the OpenCM 9.04 board, you must use Serial1 for Serial. And because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.)
32+
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
3333
#define DEBUG_SERIAL Serial
34-
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (To use the DXL port on the OpenCM 9.04 board, you must use 28 for DIR PIN.)
34+
const uint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
3535
#elif ARDUINO_OpenCR // Official ROBOTIS board with DXL circuit.
3636
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
3737
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78

0 commit comments

Comments
 (0)