You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The examples defines GPIO pins based on the use with DYNAMIXEL Shields.
3
+
## Serial and Direction Pin definitions of ROBOTIS controllers
5
4
- When running DYNAMIXEL without DYNAMIXEL Shields on OpenCM9.04, OpenCR or custom boards, you might need to change the Serial and DYNAMIXEL Direction Pin.
6
5
- We provide the information below to make it easier to define Serial and Direction pins for specific hardware.
7
6
8
7
|Board Name|Serial|Direction Pin|Note|
9
8
|:-:|:-:|:-:|:-:|
10
-
|OpenCM9.04|Serial1|28|because of the OpenCM 9.04 driver code, you must call Serial1.setDxlMode(true); before dxl.begin();.|
9
+
|OpenCM9.04|Serial1|28|Uploading Arduino Sketch will erase the factory firmware. The firmware can be recovered with DYNAMIXEL Wizard 2.0|
11
10
|OpenCM485EXP|Serial3|22||
12
-
|OpenCR|Serial3|84|For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it. ([Reference link](https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78))|
11
+
|OpenCR|Serial3|84|OpenCR has an FET switch to control power supply to DYNAMIXEL. ([Reference link](https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78))|
12
+
|OpenRB-150|Serial1|(-1)Automatic|-|
13
13
14
14
15
15
## How to add new DYNAMIXEL model.
@@ -19,6 +19,3 @@
19
19
## How to create custom PortHandler Class
20
20
- Please refer to [port_handler.h](https://github.com/ROBOTIS-GIT/Dynamixel2Arduino/blob/master/src/utility/port_handler.h)
21
21
- Create a new class by inheriting PortHandler as public. (Like SerialPortHandler and USBSerialPortHandler)
22
-
23
-
## TODO
24
-
- Separation of protocol codes (protocol, packet handler)
constuint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
33
+
constint DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
34
34
#elif defined(ARDUINO_SAM_DUE) // When using DynamixelShield
35
35
#defineDXL_SERIAL Serial
36
36
#defineDEBUG_SERIAL SerialUSB
37
-
constuint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
37
+
constint DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
38
38
#elif defined(ARDUINO_SAM_ZERO) // When using DynamixelShield
39
39
#defineDXL_SERIAL Serial1
40
40
#defineDEBUG_SERIAL SerialUSB
41
-
constuint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
41
+
constint DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
42
42
#elif defined(ARDUINO_OpenCM904) // When using official ROBOTIS board with DXL circuit.
43
43
#defineDXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
44
44
#defineDEBUG_SERIAL Serial
45
-
constuint8_t DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
45
+
constint DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
46
46
#elif defined(ARDUINO_OpenCR) // When using official ROBOTIS board with DXL circuit.
47
47
// For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
48
48
// Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78
49
49
#defineDXL_SERIAL Serial3
50
50
#defineDEBUG_SERIAL Serial
51
-
constuint8_t DXL_DIR_PIN = 84; // OpenCR Board's DIR PIN.
51
+
constint DXL_DIR_PIN = 84; // OpenCR Board's DIR PIN.
52
+
#elif defined(ARDUINO_OpenRB) // When using OpenRB-150
53
+
//OpenRB does not require the DIR control pin.
54
+
#defineDXL_SERIAL Serial1
55
+
#defineDEBUG_SERIAL Serial
56
+
constint DXL_DIR_PIN = -1;
52
57
#else// Other boards when using DynamixelShield
53
58
#defineDXL_SERIAL Serial1
54
59
#defineDEBUG_SERIAL Serial
55
-
constuint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
60
+
constint DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
0 commit comments