l298n

no_std driver for L298N (Dual H-Bridge Motor Controller module)

Build Status crates.io

Basic usage

Include this library as a dependency in your Cargo.toml:

rust [dependencies.l298n] version = "<version>" Use embedded-hal implementation to get PINA, PINB and PWM and then create a single motor:

```rust extern crate l298n;

let motor = l298n::Motor::new(PINA, PINB, PWM);

motor.set_duty(12);

motor.brake();

or a l298 dual bridge motor: rust extern crate l298n;

let motor = l298n::L298N::new(PIN1A, PIN2A, PWM1B, IN2B, PIN1B, PWMB);

motor.a.set_duty(12);

motor.a.brake();

```

Documentation

API Docs available on docs.rs

License

MIT license