{"id":7378,"date":"2020-09-22T17:07:40","date_gmt":"2020-09-22T15:07:40","guid":{"rendered":"https:\/\/blog.generationrobots.com\/?p=7378"},"modified":"2022-03-01T14:48:42","modified_gmt":"2022-03-01T13:48:42","slug":"control-a-dynamixel-servomotor-from-a-pc-via-bluetooth","status":"publish","type":"post","link":"https:\/\/www.generationrobots.com\/blog\/en\/control-a-dynamixel-servomotor-from-a-pc-via-bluetooth\/","title":{"rendered":"Control a Dynamixel servomotor from a PC via Bluetooth"},"content":{"rendered":"\n<html>\n <body>\n  <p>\n   With this tutorial, you will learn how to easily control your Robotis Dynamixel servomotors from your computer thanks to a Bluetooth connection. This makes it easy to perform your tests and saves you from annoying cable connections.\n  <\/p>\n  \n  \n  <h2 class=\"wp-block-heading\">\n   Required hardware\n  <\/h2>\n  \n  \n  <ul class=\"wp-block-list\">\n   <li>\n    12V\/5A power supply.\n   <\/li>\n   <li>\n    BT-410 Dongle module.\n   <\/li>\n   <li>\n    BT-410 Slave module.\n   <\/li>\n   <li>\n    Dynamixel servomotor (here an MX-28).\n   <\/li>\n   <li>\n    OpenCM9.04.\n   <\/li>\n   <li>\n    OpenCM485\n   <\/li>\n   <li>\n    3 (or 4) pin cable for Dynamixel.\n   <\/li>\n   <li>\n    Micro USB cable.\n   <\/li>\n  <\/ul>\n  \n  \n  <h2 class=\"wp-block-heading\">\n   Required software\n  <\/h2>\n  \n  \n  <ul class=\"wp-block-list\">\n   <li>\n    Arduino.IDE.\n   <\/li>\n  <\/ul>\n  \n  \n  <h2 class=\"wp-block-heading\">\n   Installation\n  <\/h2>\n  \n  \n  <h3 class=\"wp-block-heading\">\n   Connections:\n  <\/h3>\n  \n  \n  <ul class=\"wp-block-list\">\n   <li>\n    Connect the\n    <a aria-label=\" (opens in a new tab)\" href=\"\/en\/401596-opencm904-a-control-board-for-dynamixel-servomotors.html\" rel=\"noreferrer noopener\" target=\"_blank\">\n     OpenCM9.04\n    <\/a>\n    board to the\n    <a aria-label=\" (opens in a new tab)\" href=\"\/en\/402014-opencm-485-expansion-board.html\" rel=\"noreferrer noopener\" target=\"_blank\">\n     OpenCM485\n    <\/a>\n    EXP board.\n   <\/li>\n  <\/ul>\n  \n  \n  <div class=\"wp-block-image\">\n   <figure class=\"aligncenter size-large is-resized\">\n    <img fetchpriority=\"high\" decoding=\"async\" alt=\"\" class=\"wp-image-7385\" height=\"273\" src=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2020\/09\/img1.jpg\" width=\"364\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img1.jpg 512w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img1-300x225.jpg 300w\" sizes=\"(max-width: 364px) 100vw, 364px\" \/>\n   <\/figure>\n  <\/div>\n  \n  \n  <ul class=\"wp-block-list\">\n   <li>\n    Connect the\n    <a href=\"\/en\/169-dynamixel-servomotors\">\n     servomotor\n    <\/a>\n    to the OpenCM485 EXP via the 3 (or 4) pin Dynamixel cable.\n   <\/li>\n   <li>\n    Connect the\n    <a href=\"\/en\/402343-bt-410-bluetooth-module-slave.html\">\n     BT-410 Slave\n    <\/a>\n    to the OpenCM9.04 board on the UART port.\n   <\/li>\n   <li>\n    Connect the OpenCM9.04 board to the PC via the micro USB cable.\n   <\/li>\n  <\/ul>\n  \n  \n  <div class=\"wp-block-image\">\n   <figure class=\"aligncenter size-large\">\n    <img decoding=\"async\" width=\"512\" height=\"384\" alt=\"\" class=\"wp-image-7386\" src=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2020\/09\/img2.jpg\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img2.jpg 512w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img2-300x225.jpg 300w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/>\n   <\/figure>\n  <\/div>\n  \n  \n  <p>\n   The OpenCM9.04 board is switched on and the BT-410 module flashes blue.\n  <\/p>\n  \n  \n  <h3 class=\"wp-block-heading\">\n   Software:\n  <\/h3>\n  \n  \n  <ul class=\"wp-block-list\">\n   <li>\n    Download the\n    <a href=\"https:\/\/www.arduino.cc\/en\/main\/software\" rel=\"noreferrer noopener\" target=\"_blank\">\n     Arduino.IDE\n    <\/a>\n    software.\n   <\/li>\n   <li>\n    Launch Arduino.IDE, go to\n    <em>\n     File\n    <\/em>\n    , then\n    <em>\n     Preferences\n    <\/em>\n    .\n   <\/li>\n   <li>\n    In\n    <em>\n     Preferences\n    <\/em>\n    , enter the following link into the\n    <em>\n     Additional Boards Manager URLs\n    <\/em>\n    field: https:\/\/raw.githubusercontent.com\/ROBOTIS-GIT\/OpenCM9.04\/master\/arduino\/opencm_release\/package_opencm9.04_index.json\n   <\/li>\n  <\/ul>\n  \n  \n  <div class=\"wp-block-image\">\n   <figure class=\"aligncenter size-large\">\n    <img decoding=\"async\" width=\"512\" height=\"288\" alt=\"\" class=\"wp-image-7379\" src=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2020\/09\/img-3-1.png\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img-3-1.png 512w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img-3-1-300x169.png 300w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/>\n   <\/figure>\n  <\/div>\n  \n  \n  <ul class=\"wp-block-list\">\n   <li>\n    Go to\n    <em>\n     Tools\n    <\/em>\n    , then\n    <em>\n     Board Type\n    <\/em>\n    and click on\n    <em>\n     Board Manager\n    <\/em>\n    .\n   <\/li>\n   <li>\n    Search for the\n    <em>\n     OpenCM9.04 by ROBOTIS\n    <\/em>\n    section and press\n    <em>\n     install\n    <\/em>\n    button.\n   <\/li>\n  <\/ul>\n  \n  \n  <div class=\"wp-block-image\">\n   <figure class=\"aligncenter size-large\">\n    <img loading=\"lazy\" decoding=\"async\" width=\"509\" height=\"512\" alt=\"\" class=\"wp-image-7380\" src=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2020\/09\/img-4-1.png\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img-4-1.png 509w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img-4-1-298x300.png 298w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img-4-1-150x150.png 150w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img-4-1-140x140.png 140w\" sizes=\"(max-width: 509px) 100vw, 509px\" \/>\n   <\/figure>\n  <\/div>\n  \n  \n  <ul class=\"wp-block-list\">\n   <li>\n    Close the Arduino.IDE software, then launch it again.\n   <\/li>\n   <li>\n    Go to\n    <em>\n     Tools\n    <\/em>\n    , and then\n    <em>\n     Board Type\n    <\/em>\n    . From the list, select\n    <em>\n     OpenCM9.04 Board\n    <\/em>\n    .\n   <\/li>\n   <li>\n    Go to\n    <em>\n     Tools\n    <\/em>\n    , then to\n    <em>\n     Port\n    <\/em>\n    . Select the port corresponding to the OpenCM9.04 board.\n   <\/li>\n  <\/ul>\n  \n  \n  <h2 class=\"wp-block-heading\">\n   Operation\n  <\/h2>\n  \n  \n  <h3 class=\"wp-block-heading\">\n   Setup\n  <\/h3>\n  \n  \n  <ul class=\"wp-block-list\">\n   <li>\n    Launch Arduino.IDE.\n   <\/li>\n   <li>\n    Go to\n    <em>\n     Files\n    <\/em>\n    ?\n    <em>\n     Examples\n    <\/em>\n    ?\n    <em>\n     OpenCM9.04\n    <\/em>\n    ?\n    <em>\n     08_DynamixelWorkbench\n    <\/em>\n    , then click on\n    <em>\n     h_Position\n    <\/em>\n    .\n   <\/li>\n  <\/ul>\n  \n  \n  <div class=\"wp-block-image\">\n   <figure class=\"aligncenter size-large\">\n    <img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"384\" alt=\"\" class=\"wp-image-7381\" src=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2020\/09\/img-5-1.jpg\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img-5-1.jpg 512w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img-5-1-300x225.jpg 300w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/>\n   <\/figure>\n  <\/div>\n  \n  \n  <ul class=\"wp-block-list\">\n   <li>\n    A new window opens with the setup program required to control the servomotor.\n   <\/li>\n  <\/ul>\n  \n  \n  <h3 class=\"wp-block-heading\">\n   Program\n  <\/h3>\n  \n  \n  <ul class=\"wp-block-list\">\n   <li>\n    Write the program you want.\n   <\/li>\n   <li>\n    Download the program onto the OpenCM9.04.\n   <\/li>\n   <li>\n    Unplug the OpenCM9.04 board from the PC\n   <\/li>\n   <li>\n    Power the OpenCM485 EXP board using the 12V\/5A power supply and press the switch.\n   <\/li>\n   <li>\n    Connect the\n    <a aria-label=\" (opens in a new tab)\" href=\"\/en\/403363-bt-410-usb-bluetooth-dongle.html\" rel=\"noreferrer noopener\" target=\"_blank\">\n     BT-410 Dongle\n    <\/a>\n    module to the PC. Bring the two modules closer together in order to pair them. The modules are synchronized when the flashing stops.\n   <\/li>\n  <\/ul>\n  \n  \n  <div class=\"wp-block-image\">\n   <figure class=\"aligncenter size-large\">\n    <img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"162\" alt=\"\" class=\"wp-image-7382\" src=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2020\/09\/img-6-1.png\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img-6-1.png 512w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img-6-1-300x95.png 300w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/>\n   <\/figure>\n  <\/div>\n  \n  \n  <ul class=\"wp-block-list\">\n   <li>\n    From the Arduino.IDE software, go to\n    <em>\n     Tools\n    <\/em>\n    ,\n    <em>\n     Port\n    <\/em>\n    and select the port corresponding to the BT-410 Dongle module.\n   <\/li>\n   <li>\n    Open the serial monitor to communicate with the OpenCM9.04 board. The monitor must be set to 57600 baud.\n   <\/li>\n  <\/ul>\n  \n  \n  <h2 class=\"wp-block-heading\">\n   Examples of programs\n  <\/h2>\n  \n  \n  <h3 class=\"wp-block-heading\">\n   Controlling the servo motor\n  <\/h3>\n  \n  \n  <p>\n   Allows the position of the servo motor to be selected between position 0 and position 4095.\n  <\/p>\n  \n  \n  <ul class=\"wp-block-list\">\n   <li>\n    Enter the code line \u00ab\n    <em>\n     int Position_du_servomoteur\u00a0;\n    <\/em>\n    \u00bb below the code line \u00ab\n    <em>\n     DynamixelWorkbench dxl_wb;\n    <\/em>\n    \u00bb.\n   <\/li>\n   <li>\n    In the\n    <em>\n     void setup()\n    <\/em>\n    function, enter the code line\u00a0\u00ab\n    <em>\n     Serial2.begin(57600);\n    <\/em>\n    \u00bb.\n   <\/li>\n   <li>\n    In the\n    <em>\n     void loop()\n    <\/em>\n    function, enter the following lines of code:\n   <\/li>\n  <\/ul>\n  \n  \n  <div class=\"wp-block-image\">\n   <figure class=\"aligncenter size-large\">\n    <img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"357\" alt=\"\" class=\"wp-image-7383\" src=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2020\/09\/img-7-1.png\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img-7-1.png 512w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img-7-1-300x209.png 300w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/>\n   <\/figure>\n  <\/div>\n  \n  \n  <h3 class=\"wp-block-heading\">\n   Series of positions\n  <\/h3>\n  \n  \n  <p>\n   Allows to launch a series of predefined positions when a specific command is given (here, the command is \u00ab\u00a01\u00a0\u00bb).\n  <\/p>\n  \n  \n  <ul class=\"wp-block-list\">\n   <li>\n    Enter the code line \u00ab\n    <em>\n     int Lancement_du_programme\u00a0;\n    <\/em>\n    \u00bb below the code line \u00ab\n    <em>\n     DynamixelWorkbench dxl_wb;\n    <\/em>\n    \u00bb.\n   <\/li>\n   <li>\n    In the\n    <em>\n     void setup()\n    <\/em>\n    function, enter the code line\u00a0\u00ab\n    <em>\n     Serial2.begin(57600);\n    <\/em>\n    \u00bb.\n   <\/li>\n   <li>\n    In the\n    <em>\n     void loop()\n    <\/em>\n    function, enter the following lines of code:\n   <\/li>\n  <\/ul>\n  \n  \n  <div class=\"wp-block-image\">\n   <figure class=\"aligncenter size-large\">\n    <img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"313\" alt=\"\" class=\"wp-image-7384\" src=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2020\/09\/img-8-1.png\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img-8-1.png 512w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2020\/09\/img-8-1-300x183.png 300w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/>\n   <\/figure>\n  <\/div>\n  \n <\/body>\n<\/html>","protected":false},"excerpt":{"rendered":"<p>With this tutorial, you will learn how to easily control your Robotis Dynamixel servomotors from your computer thanks to a Bluetooth connection. This makes it easy to perform your tests and saves you from annoying cable connections. Required hardware 12V\/5A power supply. BT-410 Dongle module. BT-410 Slave module. Dynamixel servomotor (here an MX-28). OpenCM9.04. OpenCM485[&#8230;]<br \/> <a class=\"button\" href=\"https:\/\/www.generationrobots.com\/blog\/en\/control-a-dynamixel-servomotor-from-a-pc-via-bluetooth\/\" style=\"float:right;\">Read this article &gt;&gt;<\/a><\/p>\n","protected":false},"author":188,"featured_media":7376,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10535],"tags":[],"class_list":["post-7378","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides-and-tutorials"],"_links":{"self":[{"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/posts\/7378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/users\/188"}],"replies":[{"embeddable":true,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/comments?post=7378"}],"version-history":[{"count":2,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/posts\/7378\/revisions"}],"predecessor-version":[{"id":7546,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/posts\/7378\/revisions\/7546"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/media\/7376"}],"wp:attachment":[{"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/media?parent=7378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/categories?post=7378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/tags?post=7378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}