No description
  • C++ 98.3%
  • C 1.6%
  • CMake 0.1%
Find a file
2026-08-22 16:27:20 +02:00
examples remove dir pin 2026-08-22 15:37:57 +02:00
include remove dir pin 2026-08-22 15:37:57 +02:00
schematic Updated README 2024-05-03 19:23:35 +02:00
.gitignore Ping example - OK 2024-05-02 22:21:59 +02:00
actuator.cpp Ping example - OK 2024-05-02 22:21:59 +02:00
arduino_droppings.cpp Ping example - OK 2024-05-02 22:21:59 +02:00
CMakeLists.txt fix dependencies 2026-08-22 15:30:13 +02:00
dynamixel2espressif.cpp remove dir pin 2026-08-22 15:37:57 +02:00
idf_component.yml Updated README 2024-05-03 20:24:00 +02:00
Kconfig.projbuild fix config 2026-08-22 15:44:18 +02:00
LICENSE Initial commit 2024-05-02 20:48:52 +02:00
master.cpp Ping example - OK 2024-05-02 22:21:59 +02:00
port_handler.cpp remove uart mode 2026-08-22 16:27:20 +02:00
protocol.cpp Ping example - OK 2024-05-02 22:21:59 +02:00
README.md remove dir pin 2026-08-22 15:37:57 +02:00

Dynamixel2Espressif

This is an espressif port of the Dynamixel2Arduino Dynamixel library.

Using the component

Run the following command in your ESP-IDF project to install this component from the espressif component registry:

idf.py add-dependency "hansj66/dynamixel2espressif"

Or - add the following to your idf_component.yml to define a dependency to the github repository

dependencies:
	dynamixel2espressif:
		path: dynamixel2espressif.git
		git: ssh://git@github.com:hansj66/dynamixel2espressif.git

To run an example, create it as follows:

idf.py create-project-from-example "hansj66/dynamixel2espressif:<example name>"

Example: If you want to create a project based on the "ping" example:

idf.py create-project-from-example "hansj66/dynamixel2espressif:ping"

The default pinout is:

  • DATA_PIN=18

To change the default pinout:

idf.py menuconfig

And then navigate to the menu "Dynamixel 2 Espressif configuration" to customize the pinout to your application.

Examples

Examples beyond the "ping" and "position" examples can be found in the original Dynamixel2Arduino repository. The syntax is identical with the espressif version, except for the constructor.

License

This component is provided under Apache 2.0 license, see LICENSE file for details.

Hardware

This library has been tested with Dynamixel XL-320 and Dynamixel AX-12 servos. These are all using half duplex protocol.

Test setup

schematic

This schematic shows a section of the schematic for a PCB with 6 physical ports (Since the servos are normally daisy chained, you can get away with having only having one physical port).

Since the ESP32 is a 3.3V device and the servos use 5V logic, we have to add a level shifter between the ESP and the dynamixel bus.

The level shifter controls the NC7WZ241/74LVC2G241 buffer which in turn controls the bus. The port handler pulls the SERVO_DIR pin high before transmission and then pulls it low after transmission, to enable reception of status packets from the servos.

Please refer to the The Dynamixel 2.0 protocol in the ROBOTIS e-manual for details.