Random code with UNIT_DEGREE

This random code works fine:
dxl.setGoalPosition(1, random(500, 6000));

But how do I add UNIT_DEGREE to the above code?

Thanks.

The API for the Dynamixel2Arduino library is available here

image

Thanks for your help.

Glad to be of help. The API for D2A library is well documented.