Microcontroller
I am using the OpenRB-150 board
Software Description
I am trying to run the scan_dynamixel script from the Dynamixel2Arduino examples.
Issue Description
I have two Dynamixel XL430-w250 motors connected to the OpenRB-150 board but neither servo is being picked up by the scan_dynamixel script.
I have been using the OpenRB-150 board for the last month and I haven’t had any issues with it until today. I replaced the OpenRB-150 with the Dynamixel Shield (DYNAMIXEL Shield) and everything was working fine.
The motors are set to a baud rate of 1000000, and ID’s 1, 2.
Additional Information/Attachments
Picture of the Hardware:
The code:
#include <Dynamixel2Arduino.h>
#define DEBUG_SERIAL Serial
#define DXL_SERIAL Serial1
#define MAX_BAUD 5
const int32_t buad[MAX_BAUD] = {57600, 115200, 1000000, 2000000, 3000000};
Dynamixel2Arduino dxl(DXL_SERIAL);
//This namespace is required to use Control table item names
using namespace ControlTableItem;
void setup() {
// put your setup code here, to run once:
int8_t index = 0;
int8_t found_dynamixel = 0;
// For Uno, Nano, Mini, and Mega, use UART port of DYNAMIXEL Shield to debug.
DEBUG_SERIAL.begin(115200); //set debugging port baudrate to 115200bps
while(!DEBUG_SERIAL); //Wait until the serial port is opened
for(int8_t protocol = 1; protocol < 3; protocol++) {
// Set Port Protocol Version. This has to match with DYNAMIXEL protocol version.
dxl.setPortProtocolVersion((float)protocol);
DEBUG_SERIAL.print("SCAN PROTOCOL ");
DEBUG_SERIAL.println(protocol);
for(index = 0; index < MAX_BAUD; index++) {
// Set Port baudrate.
DEBUG_SERIAL.print("SCAN BAUDRATE ");
DEBUG_SERIAL.println(buad[index]);
dxl.begin(buad[index]);
for(int id = 0; id < 10; id++) {
//iterate until all ID in each buadrate is scanned.
if(dxl.ping(id)) {
DEBUG_SERIAL.print("ID : ");
DEBUG_SERIAL.print(id);
DEBUG_SERIAL.print(", Model Number: ");
DEBUG_SERIAL.println(dxl.getModelNumber(id));
found_dynamixel++;
}
}
}
}
DEBUG_SERIAL.print(“Total “);
DEBUG_SERIAL.print(found_dynamixel);
DEBUG_SERIAL.println(” DYNAMIXEL(s) found!”);
}