|
24 | 24 | SoftwareSerial soft_serial(7, 8); // DYNAMIXELShield UART RX/TX
|
25 | 25 | #define DXL_SERIAL Serial
|
26 | 26 | #define DEBUG_SERIAL soft_serial
|
27 |
| - const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN |
| 27 | + const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN |
28 | 28 | #elif defined(ARDUINO_SAM_DUE) // When using DynamixelShield
|
29 | 29 | #define DXL_SERIAL Serial
|
30 | 30 | #define DEBUG_SERIAL SerialUSB
|
31 |
| - const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN |
| 31 | + const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN |
32 | 32 | #elif defined(ARDUINO_SAM_ZERO) // When using DynamixelShield
|
33 | 33 | #define DXL_SERIAL Serial1
|
34 | 34 | #define DEBUG_SERIAL SerialUSB
|
35 |
| - const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN |
| 35 | + const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN |
36 | 36 | #elif defined(ARDUINO_OpenCM904) // When using official ROBOTIS board with DXL circuit.
|
37 | 37 | #define DXL_SERIAL Serial3 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
|
38 | 38 | #define DEBUG_SERIAL Serial
|
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) |
| 39 | + const int DXL_DIR_PIN = 22; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board) |
40 | 40 | #elif defined(ARDUINO_OpenCR) // When using official ROBOTIS board with DXL circuit.
|
41 | 41 | // For OpenCR, there is a DXL Power Enable pin, so you must initialize and control it.
|
42 | 42 | // Reference link : https://github.com/ROBOTIS-GIT/OpenCR/blob/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_arduino.cpp#L78
|
43 | 43 | #define DXL_SERIAL Serial3
|
44 | 44 | #define DEBUG_SERIAL Serial
|
45 |
| - const uint8_t DXL_DIR_PIN = 84; // OpenCR Board's DIR PIN. |
| 45 | + const int DXL_DIR_PIN = 84; // OpenCR Board's DIR PIN. |
46 | 46 | #elif defined(ARDUINO_OpenRB) // When using OpenRB-150
|
47 | 47 | //OpenRB does not require the DIR control pin.
|
48 | 48 | #define DXL_SERIAL Serial1
|
49 | 49 | #define DEBUG_SERIAL Serial
|
| 50 | + const int DXL_DIR_PIN = -1; |
50 | 51 | #else // Other boards when using DynamixelShield
|
51 | 52 | #define DXL_SERIAL Serial1
|
52 | 53 | #define DEBUG_SERIAL Serial
|
53 |
| - const uint8_t DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN |
| 54 | + const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN |
54 | 55 | #endif
|
55 | 56 | #define DXL_MOVING_STATUS_THRESHOLD 10
|
56 | 57 |
|
|
0 commit comments