By Dynamixel shield I mean the shield compatible with the arduino Uno or Mega seen here, DYNAMIXEL Shield. I can only scan the dynamixels using the dynamixel shield, not the OpenRB-150 board.
I’m not sure what you mean by U2D2 or CM-550, so no.
I can upload any arduino sketch fine, I havent gotten any error. The scripts run fine, but I just cant receive or send info to the servos. I have tried the usb_to_dynamixel.ino, but could not connect the servos to the Dynamixel wizard.
Here is the code that I am trying to run:
#include <Dynamixel2Arduino.h>
#define DXL_SERIAL Serial1
#define DEBUG_SERIAL Serial
const uint8_t DXL_ID = 2;
Dynamixel2Arduino dxl(DXL_SERIAL);
int target;
//This namespace is required to use Control table item names
using namespace ControlTableItem;
void setup() {
// put your setup code here, to run once:
DEBUG_SERIAL.begin(115200);
while(!Serial);
dxl.setPortProtocolVersion(2.0);
dxl.begin(1000000);
dxl.torqueOff(DXL_ID);
dxl.setOperatingMode(DXL_ID, OP_VELOCITY);
dxl.writeControlTableItem(VELOCITY_LIMIT, DXL_ID, 1000);
dxl.torqueOn(DXL_ID);
DEBUG_SERIAL.print("ID: "); DEBUG_SERIAL.println(dxl.readControlTableItem(ID, DXL_ID));
DEBUG_SERIAL.print("Acc. Profile: "); DEBUG_SERIAL.println(dxl.readControlTableItem(PROFILE_ACCELERATION, DXL_ID));
DEBUG_SERIAL.print("Acc. Limit: "); DEBUG_SERIAL.println(dxl.readControlTableItem(ACCELERATION_LIMIT, DXL_ID));
DEBUG_SERIAL.print("PWM_LIMIT: "); DEBUG_SERIAL.println(dxl.readControlTableItem(PWM_LIMIT, DXL_ID));
DEBUG_SERIAL.print("PRESENT_PWM: "); DEBUG_SERIAL.println(dxl.readControlTableItem(PRESENT_PWM, DXL_ID));
DEBUG_SERIAL.print("Vel Limit: "); DEBUG_SERIAL.println(dxl.readControlTableItem(VELOCITY_LIMIT, DXL_ID));
DEBUG_SERIAL.print("Goal Velocity: "); DEBUG_SERIAL.println(dxl.readControlTableItem(GOAL_VELOCITY, DXL_ID));
DEBUG_SERIAL.print("Current Velocity: "); DEBUG_SERIAL.println(dxl.readControlTableItem(PRESENT_VELOCITY, DXL_ID));
DEBUG_SERIAL.print("Present Load: "); DEBUG_SERIAL.println(dxl.readControlTableItem(PRESENT_LOAD, DXL_ID));
}
I know that the baud rate and ID are correct since I could scan the servo using the scan_dynamixel sketch with the Dynamixel Shield.