Skip to content

Commit de5a196

Browse files
authored
Merge pull request #102 from ROBOTIS-GIT/OpenRB-150
update for OpenRB-150
2 parents 29c5446 + fc80b17 commit de5a196

File tree

35 files changed

+3574
-3400
lines changed

35 files changed

+3574
-3400
lines changed

examples/advanced/DEPRECATED_bulk_read_write_raw/DEPRECATED_bulk_read_write_raw.ino

+11-6
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,34 @@
2626
SoftwareSerial soft_serial(7, 8); // DYNAMIXELShield UART RX/TX
2727
#define DXL_SERIAL Serial
2828
#define DEBUG_SERIAL soft_serial
29-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
29+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
3030
#elif defined(ARDUINO_SAM_DUE) // When using DynamixelShield
3131
#define DXL_SERIAL Serial
3232
#define DEBUG_SERIAL SerialUSB
33-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
33+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
3434
#elif defined(ARDUINO_SAM_ZERO) // When using DynamixelShield
3535
#define DXL_SERIAL Serial1
3636
#define DEBUG_SERIAL SerialUSB
37-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
37+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
3838
#elif defined(ARDUINO_OpenCM904) // When using official ROBOTIS board with DXL circuit.
3939
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
4040
#define DEBUG_SERIAL Serial
41-
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)
41+
const int DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
4242
#elif defined(ARDUINO_OpenCR) // When using official ROBOTIS board with DXL circuit.
4343
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
4444
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78
4545
#define DXL_SERIAL Serial3
4646
#define DEBUG_SERIAL Serial
47-
const uint8_t DXL_DIR_PIN = 84; // OpenCR Board's DIR PIN.
47+
const int DXL_DIR_PIN = 84; // OpenCR Board's DIR PIN.
48+
#elif defined(ARDUINO_OpenRB) // When using OpenRB-150
49+
//OpenRB does not require the DIR control pin.
50+
#define DXL_SERIAL Serial1
51+
#define DEBUG_SERIAL Serial
52+
const int DXL_DIR_PIN = -1;
4853
#else // Other boards when using DynamixelShield
4954
#define DXL_SERIAL Serial1
5055
#define DEBUG_SERIAL Serial
51-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
56+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
5257
#endif
5358

5459
/* XelInfoForBulkReadParam_t

examples/advanced/DEPRECATED_sync_bulk_raw/DEPRECATED_sync_bulk_raw.ino

+11-6
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,34 @@
2626
SoftwareSerial soft_serial(7, 8); // DYNAMIXELShield UART RX/TX
2727
#define DXL_SERIAL Serial
2828
#define DEBUG_SERIAL soft_serial
29-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
29+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
3030
#elif defined(ARDUINO_SAM_DUE) // When using DynamixelShield
3131
#define DXL_SERIAL Serial
3232
#define DEBUG_SERIAL SerialUSB
33-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
33+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
3434
#elif defined(ARDUINO_SAM_ZERO) // When using DynamixelShield
3535
#define DXL_SERIAL Serial1
3636
#define DEBUG_SERIAL SerialUSB
37-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
37+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
3838
#elif defined(ARDUINO_OpenCM904) // When using official ROBOTIS board with DXL circuit.
3939
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
4040
#define DEBUG_SERIAL Serial
41-
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)
41+
const int DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
4242
#elif defined(ARDUINO_OpenCR) // When using official ROBOTIS board with DXL circuit.
4343
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
4444
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78
4545
#define DXL_SERIAL Serial3
4646
#define DEBUG_SERIAL Serial
47-
const uint8_t DXL_DIR_PIN = 84; // OpenCR Board's DIR PIN.
47+
const int DXL_DIR_PIN = 84; // OpenCR Board's DIR PIN.
48+
#elif defined(ARDUINO_OpenRB) // When using OpenRB-150
49+
//OpenRB does not require the DIR control pin.
50+
#define DXL_SERIAL Serial1
51+
#define DEBUG_SERIAL Serial
52+
const int DXL_DIR_PIN = -1;
4853
#else // Other boards when using DynamixelShield
4954
#define DXL_SERIAL Serial1
5055
#define DEBUG_SERIAL Serial
51-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
56+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
5257
#endif
5358

5459
/* ParamForSyncReadInst_t

examples/advanced/DEPRECATED_sync_read_write_raw/DEPRECATED_sync_read_write_raw.ino

+11-6
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,34 @@
2626
SoftwareSerial soft_serial(7, 8); // DYNAMIXELShield UART RX/TX
2727
#define DXL_SERIAL Serial
2828
#define DEBUG_SERIAL soft_serial
29-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
29+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
3030
#elif defined(ARDUINO_SAM_DUE) // When using DynamixelShield
3131
#define DXL_SERIAL Serial
3232
#define DEBUG_SERIAL SerialUSB
33-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
33+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
3434
#elif defined(ARDUINO_SAM_ZERO) // When using DynamixelShield
3535
#define DXL_SERIAL Serial1
3636
#define DEBUG_SERIAL SerialUSB
37-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
37+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
3838
#elif defined(ARDUINO_OpenCM904) // When using official ROBOTIS board with DXL circuit.
3939
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
4040
#define DEBUG_SERIAL Serial
41-
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)
41+
const int DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
4242
#elif defined(ARDUINO_OpenCR) // When using official ROBOTIS board with DXL circuit.
4343
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
4444
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78
4545
#define DXL_SERIAL Serial3
4646
#define DEBUG_SERIAL Serial
47-
const uint8_t DXL_DIR_PIN = 84; // OpenCR Board's DIR PIN.
47+
const int DXL_DIR_PIN = 84; // OpenCR Board's DIR PIN.
48+
#elif defined(ARDUINO_OpenRB) // When using OpenRB-150
49+
//OpenRB does not require the DIR control pin.
50+
#define DXL_SERIAL Serial1
51+
#define DEBUG_SERIAL Serial
52+
const int DXL_DIR_PIN = -1;
4853
#else // Other boards when using DynamixelShield
4954
#define DXL_SERIAL Serial1
5055
#define DEBUG_SERIAL Serial
51-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
56+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
5257
#endif
5358

5459
/* ParamForSyncReadInst_t

examples/advanced/add_custom_SerialPortHandler/add_custom_SerialPortHandler.ino

+11-6
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,34 @@
2222
SoftwareSerial soft_serial(7, 8); // DYNAMIXELShield UART RX/TX
2323
#define DXL_SERIAL Serial
2424
#define DEBUG_SERIAL soft_serial
25-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
25+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
2626
#elif defined(ARDUINO_SAM_DUE) // When using DynamixelShield
2727
#define DXL_SERIAL Serial
2828
#define DEBUG_SERIAL SerialUSB
29-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
29+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
3030
#elif defined(ARDUINO_SAM_ZERO) // When using DynamixelShield
3131
#define DXL_SERIAL Serial1
3232
#define DEBUG_SERIAL SerialUSB
33-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
33+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
3434
#elif defined(ARDUINO_OpenCM904) // When using official ROBOTIS board with DXL circuit.
3535
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
3636
#define DEBUG_SERIAL Serial
37-
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)
37+
const int DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
3838
#elif defined(ARDUINO_OpenCR) // When using official ROBOTIS board with DXL circuit.
3939
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
4040
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78
4141
#define DXL_SERIAL Serial3
4242
#define DEBUG_SERIAL Serial
43-
const uint8_t DXL_DIR_PIN = 84; // OpenCR Board's DIR PIN.
43+
const int DXL_DIR_PIN = 84; // OpenCR Board's DIR PIN.
44+
#elif defined(ARDUINO_OpenRB) // When using OpenRB-150
45+
//OpenRB does not require the DIR control pin.
46+
#define DXL_SERIAL Serial1
47+
#define DEBUG_SERIAL Serial
48+
const int DXL_DIR_PIN = -1;
4449
#else // Other boards when using DynamixelShield
4550
#define DXL_SERIAL Serial1
4651
#define DEBUG_SERIAL Serial
47-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
52+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
4853
#endif
4954

5055

examples/advanced/bulk_read_write_raw/bulk_read_write_raw.ino

+11-6
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,34 @@
2222
SoftwareSerial soft_serial(7, 8); // DYNAMIXELShield UART RX/TX
2323
#define DXL_SERIAL Serial
2424
#define DEBUG_SERIAL soft_serial
25-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
25+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
2626
#elif defined(ARDUINO_SAM_DUE) // When using DynamixelShield
2727
#define DXL_SERIAL Serial
2828
#define DEBUG_SERIAL SerialUSB
29-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
29+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
3030
#elif defined(ARDUINO_SAM_ZERO) // When using DynamixelShield
3131
#define DXL_SERIAL Serial1
3232
#define DEBUG_SERIAL SerialUSB
33-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
33+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
3434
#elif defined(ARDUINO_OpenCM904) // When using official ROBOTIS board with DXL circuit.
3535
#define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
3636
#define DEBUG_SERIAL Serial
37-
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)
37+
const int DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
3838
#elif defined(ARDUINO_OpenCR) // When using official ROBOTIS board with DXL circuit.
3939
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
4040
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78
4141
#define DXL_SERIAL Serial3
4242
#define DEBUG_SERIAL Serial
43-
const uint8_t DXL_DIR_PIN = 84; // OpenCR Board's DIR PIN.
43+
const int DXL_DIR_PIN = 84; // OpenCR Board's DIR PIN.
44+
#elif defined(ARDUINO_OpenRB) // When using OpenRB-150
45+
//OpenRB does not require the DIR control pin.
46+
#define DXL_SERIAL Serial1
47+
#define DEBUG_SERIAL Serial
48+
const int DXL_DIR_PIN = -1;
4449
#else // Other boards when using DynamixelShield
4550
#define DXL_SERIAL Serial1
4651
#define DEBUG_SERIAL Serial
47-
const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
52+
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
4853
#endif
4954

5055

0 commit comments

Comments
 (0)