Use standard pullup instead of pulldown to match debounce circuit
This commit is contained in:
@@ -33,9 +33,9 @@ async fn main() {
|
||||
let clients_filter = warp::any().map(move || clients_filter.clone());
|
||||
|
||||
let gpio = Gpio::new().expect("gpio init");
|
||||
let mut pin = gpio.get(BUTTON_PIN).expect("pin init").into_input_pulldown();
|
||||
let mut pin = gpio.get(BUTTON_PIN).expect("pin init").into_input_pullup();
|
||||
|
||||
pin.set_async_interrupt(Trigger::RisingEdge, move |level| button_pressed(level, &clients))
|
||||
pin.set_async_interrupt(Trigger::FallingEdge, move |level| button_pressed(level, &clients))
|
||||
.expect("set interrupt");
|
||||
|
||||
// GET /
|
||||
|
||||
Reference in New Issue
Block a user