Crates.io | schmitttrigger |
lib.rs | schmitttrigger |
version | 1.0.0 |
source | src |
created_at | 2023-01-03 12:15:00.253776 |
updated_at | 2023-01-03 12:15:00.253776 |
description | A generic SchmittTrigger implementation |
homepage | |
repository | https://github.com/tfeldmann/rust-schmitttrigger/ |
max_upload_size | |
id | 750099 |
size | 3,090 |
Basic usage:
let mut trigger = SchmittTrigger::new(5, 10);
trigger.input(4) // false
trigger.input(12) // true
trigger.input(6) // still true
let result = trigger.output() // true
Works with any type that has the PartialEq trait.