Data Sheet
4/27/2018 OpenCR1.0
http://emanual.robotis.com/docs/en/parts/controller/opencr10/ 49/50
7. 8. 3. Speed
This example shows velocity control using Dynamixel. You need to set parameters of
BAUDRATE and ID.
begin function set an portHandler and packetHandler. ping function get an item of
connected Dynamixel.
wheelMode function make wheel(velocity) mode.
If Dynamixel is set correctly, goalSpeed function make it turn to position.
7. 9. OpenManipulator
7. 9. 1. OpenManipulator Chain
e-Manual OpenManipulator Chain
7. 9. 2. OpenManipulator SCARA
e-Manual OpenManipulator SCARA
7. 9. 3. OpenManipulator Link
e-Manual OpenManipulator Link
/*******************************************************************************
* Copyright 2016 ROBOTIS CO., LTD.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
/* Authors: Taehun Lim (Darby) */
#include <DynamixelWorkbench.h>
#define DXL_BUS_SERIAL1 "1" //Dynamixel on Serial1(USART1) <-OpenCM9.04
#define DXL_BUS_SERIAL2 "2" //Dynamixel on Serial2(USART2) <-LN101,BT210
#define DXL_BUS_SERIAL3 "3" //Dynamixel on Serial3(USART3) <-OpenCM 485EXP
#define DXL_BUS_SERIAL4 "/dev/ttyUSB0" //Dynamixel on Serial3(USART3) <-OpenCR
#define BAUDRATE 57600
#define DXL_ID 1
DynamixelWorkbench dxl_wb;
void setup()
{
Serial.begin(57600);
while(!Serial); // Open a Serial Monitor
dxl_wb.begin(DXL_BUS_SERIAL4, BAUDRATE);
dxl_wb.ping(DXL_ID);
dxl_wb.wheelMode(DXL_ID);
}
void loop()
{
dxl_wb.goalSpeed(DXL_ID, 300);
delay(3000);
dxl_wb.goalSpeed(DXL_ID, -300);
delay(3000);
}
OpenCR1.0
Back to Top ▲