https://github.com/ziteh/tmotor-ak-actuators-driver
Platform independent T-Motor/CubeMars AK series actuators (MIT Mini-Cheetah type) library
https://github.com/ziteh/tmotor-ak-actuators-driver
bldc library motor stm32
Last synced: 10 months ago
JSON representation
Platform independent T-Motor/CubeMars AK series actuators (MIT Mini-Cheetah type) library
- Host: GitHub
- URL: https://github.com/ziteh/tmotor-ak-actuators-driver
- Owner: ziteh
- License: mit
- Created: 2022-10-10T06:41:48.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-11T12:36:28.000Z (over 3 years ago)
- Last Synced: 2025-04-10T06:59:05.122Z (10 months ago)
- Topics: bldc, library, motor, stm32
- Language: C++
- Homepage:
- Size: 12.7 KB
- Stars: 7
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# T-Motor/CubeMars AK Actuators Driver
T-Motor/CubeMars AK series actuators (MIT Mini-Cheetah type) library
## Usage
[STM32 example](./examples/stm32/)
```cpp
void sendCanData(uint32_t id, uint8_t dlc, uint8_t *data)
{
can_frame frame;
frame.can_id = id;
frame.can_dlc = dlc;
for (int i = 0; i < dlc; i++)
{
frame.data[i] = data[i];
}
mcp2515->sendMessage(&frame);
}
int main(void)
{
/* Some code here. */
uint8_t motorId = 1;
TMotorActuators::AkActuators ak10 = TMotorActuators::AkActuators(motorId,
TMotorActuators::ak10_9_v1_1,
sendCanData);
ak10.enable();
delay(1000);
ak10.move(0.0, -50, 0, 2, 0.2); // Move to 0 rad.
delay(1000);
ak10.move(3.1415, -50, 0, 2, 0.2); // Move to 3.1415 rad.
delay(1000);
ak10.disable();
delay(1000);
}
```