Struct rusty_nail::dispenser::AdafruitPeristalticDispenser::AdafruitPeristalticDispenser
[−]
[src]
pub struct AdafruitPeristalticDispenser { /* fields omitted */ }
An implementation of a Dispenser which works with the Adafruit 12V DC Peristaltic Pumps. These pumps have the following parameters:
- Working Temperature: 0℃ - 40 ℃
- Motor voltage: 12VDC
- Motor current: 200-300mA
- Flow rate: up to 100 mL/min (1.6666... mL/second)
This will allow us to create a controller for the dispenser which should output ~100mL/min pretty reliably and scale that flow rate.
Methods
impl AdafruitPeristalticDispenser
[src]
fn new(chip: u32, number: u32) -> Result<AdafruitPeristalticDispenser>
Create a new AdafruitPeristalticDispenser which will have pwm control over the pwmchip at number. This function does not export he PwmChip
Arguments:
- chip: u32 - The
pwmchip
number to provide to AdafruitPeristalticDispenser - number: u32 - The
pwmchip
number to provide to AdafruitPeristalticDispenser
Returns:
- An error if setting the PWM chip is not found or AdafruitPeristalticDispenser.
Trait Implementations
impl Debug for AdafruitPeristalticDispenser
[src]
impl Dispenser for AdafruitPeristalticDispenser
[src]
fn remaining(&self) -> Result<f64>
Get the current liquid level in mL.
fn dispense(&mut self, quantity_mL: f64) -> Result<f64>
Dispense some quantity of liquid in mL.
fn set_level(&mut self, quantity_mL: f64) -> Result<()>
Set the current liquid level in mL.
fn max_flow_rate(&self) -> f64
Returns the maximum flow rate of the pump in mL/s
fn set_flow_rate(&mut self, rate: f64) -> Result<()>
Sets the current flow rate of the pump in mL/s