Struct rust_gpiozero::output_devices::Motor
[−]
[src]
pub struct Motor { /* fields omitted */ }
Represents a generic motor connected to a bi-directional motor driver circuit (i.e. an H-bridge). This is a composite device.
Methods
impl Motor
[src]
pub fn new(forward_pin: u64, backward_pin: u64) -> Motor
[src]
creates a new Motor instance
pub fn forward(&mut self)
[src]
Drive the motor forwards.
pub fn backward(&mut self)
[src]
Drive the motor backwards.
pub fn stop(&mut self)
[src]
Stop the motor.