Use standard pullup instead of pulldown to match debounce circuit

This commit is contained in:
2020-10-19 21:14:45 -07:00
parent fdac5e4848
commit 117979704c

View File

@@ -33,9 +33,9 @@ async fn main() {
let clients_filter = warp::any().map(move || clients_filter.clone()); let clients_filter = warp::any().map(move || clients_filter.clone());
let gpio = Gpio::new().expect("gpio init"); 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"); .expect("set interrupt");
// GET / // GET /