#stepper-motor #raspberry-pi #raspberry #motor #stepper #driver #rpi

tmc2209_pi

Basic control for TMC2209 stepper motor driver on Raspberry Pi

1 unstable release

0.1.0 May 22, 2023

#7 in #stepper

Custom license

25KB
558 lines

TMC2209_pi - A TMC2209 Stepper Motor Driver Interface for Raspberry Pi

MIT licensed

TMC2209_pi requires Raspberry Pi OS or a similar Linux distribution on some Raspberry Pi hardware.

This library is still under development and the API may still change. Pull requests are welcome.

Usage

Add a dependency for tmc2209_pi to your Cargo.toml using cargo add tmc2209_pi, or by adding the following line to your dependencies section.

[dependencies]
tmc2209_pi = "0.14.1"

Examples

This example demonstrates the movement of a stepper motor to a specific location using a combination of the UART and GPIO interfaces on the Raspberry Pi.

use tmc2209_pi::TMC2209;

fn main() {
    let mut tmc = TMC2209::new("/dev/serial0", 0x0, 115_200, 16, 20, 21, 26).unwrap();

    tmc.go_to_position(400).unwrap();
}

lib.rs:

This crate provides basic control for TMC2209 stepper motor drivers using Rasberry Pi UART and GPIO interfaces.

Note that this crate is still experimental and is not guaranteed to be stable or functional for all use cases.

Dependencies

~3MB
~67K SLoC