Skip to content

Commit 28b1f13

Browse files
committed
apply delay for bootup
1 parent 168bfb6 commit 28b1f13

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

examples/blender/openmanipulator_x/openmanipulator_x.ino

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -616,9 +616,12 @@ void setup()
616616

617617
// Open serial port for debugging
618618
DEBUG_SERIAL.begin(115200);
619+
while(!DEBUG_SERIAL);
619620

620621
// Port Baudrate to communicate with connected DYNAMIXELs. If not matched, you will meet communication fail.
621622
dxl.begin(4000000);
623+
624+
delay(100); // Allow time for DYNAMIXEL to finish boot up
622625

623626
// Recommended Protocol Version is "2.0" Note that DYNAMIXEL Protocol for each product may differ depending on your model in use.
624627
dxl.setPortProtocolVersion(DYNAMIXEL_PROTOCOL_VERSION);
@@ -644,9 +647,8 @@ void InitDXL(int frame_time)
644647
for (index = 0; index < NUMBER_OF_JOINT; index++)
645648
{
646649
if (!dxl.ping(DYNAMIXEL_ID[index])) {
647-
DEBUG_SERIAL.print("[ERROR] DYNAMIXEL ID ");
648-
DEBUG_SERIAL.print(index);
649-
DEBUG_SERIAL.println(" is not detected.");
650+
DEBUG_SERIAL.print("[ERROR] Failed to connect DYNAMIXEL ");
651+
DEBUG_SERIAL.println(DYNAMIXEL_ID[index]);
650652
} else {
651653
dxl.torqueOff(DYNAMIXEL_ID[index]);
652654
// Set the Drive Mode as Time-based mode.

0 commit comments

Comments
 (0)