Skip to content

A pure rust `no_std` driver for the TB6612FNG motor driver.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

rust-embedded-community/tb6612fng-rs

Rust Driver for TB6612FNG Motor Driver

CI Crates.io Licenses unsafe forbidden

This is a no_std driver for the TB6612FNG motor driver as can e.g. be found on the corresponding SparkFun module.

Note that this work is not affiliated with any of the vendors of the controller or controller boards.

The motor driver itself supports two motors and has a standby pin which controls both at the same time. The crate can be either used to control a single motor (using the Motor struct directly) or to control both motors (using the Tb6612fng struct) - the latter also supports using the standby functionality.

See the documentation for usage examples.

When to use what

  • You plan on using both motors and the standby feature: use Tb6612fng
  • You plan on using both motors without the standby feature: use two separate Motors
  • You plan on using a single motor with the standby feature: use Motor and control the standby pin manually
  • You plan on using a single motor without the standby feature: use Motor

Optional features

  • defmt: you can enable the defmt feature to get a defmt::debug! call for every speed change.

Examples

A simple example for the STM32F4 microcontrollers is available.

Changelog

For the changelog please see the dedicated CHANGELOG.md.

Roadmap to v1.0.0

This crate is already stable, however it's based on a release candidate version of embedded-hal, making the API unstable (the change from 1.0.0-rc.1 to 1.0.0 of e-h will be breaking from a dependency management point of view).

See the tracking issue for the roadmap to v1.0.0.

Minimum Supported Rust Version (MSRV)

This crate is guaranteed to compile on stable Rust 1.62 and up. It might compile with older versions but that may change in any new patch release.

About

A pure rust `no_std` driver for the TB6612FNG motor driver.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages