This repository contains the C++ SDK for controlling DaMiao series motors. It provides a simple and efficient way to interface with the motors using a serial connection.
- A C++ compiler that supports C++23 (e.g., GCC, Clang)
- CMake (version 3.16 or higher)
-
Clone the repository:
git clone https://github.com/your-username/your-repository.git cd your-repository -
Create a build directory:
mkdir build cd build -
Configure the project with CMake:
cmake ..
-
Compile the project:
make
This will build the
dm_motor_sdkstatic library and themotor_testexample executable.
The motor_test executable demonstrates how to use the library to control a motor. You can run it from the build directory:
./motor_testNote: You may need to modify the serial port device name in examples/motor_test.cpp to match your system (e.g., /dev/ttyUSB0 on Linux, COM3 on Windows).
include/: Header files for the SDK.src/: Source files for the SDK library.examples/: Example code demonstrating how to use the library.CMakeLists.txt: The main CMake build script.
To use the library in your own project, you can link against the dm_motor_sdk library. Refer to examples/motor_test.cpp for a basic usage pattern.