From f29ced6b6151a4f09e32717240de4c8338078db5 Mon Sep 17 00:00:00 2001 From: LailaTheElf Date: Tue, 15 Apr 2025 11:09:53 +0200 Subject: [PATCH] update pin --- src/counter.rs | 4 ++-- src/main.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/counter.rs b/src/counter.rs index fbfcde8..82c2033 100644 --- a/src/counter.rs +++ b/src/counter.rs @@ -4,9 +4,9 @@ use rppal::gpio::{Gpio, Trigger}; pub fn pulse_counter(pulses: Arc>) { let gpio = Gpio::new().expect("failt to get gpio driver"); - let mut pulse_gpio = gpio.get(15) + let mut pulse_gpio = gpio.get(23) .expect("failt to get gpio pin") - .into_input(); + .into_input_pullup(); pulse_gpio.set_interrupt(Trigger::FallingEdge, None) .expect("failt to set inerupt"); diff --git a/src/main.rs b/src/main.rs index 232fdfc..f0e2690 100644 --- a/src/main.rs +++ b/src/main.rs @@ -52,7 +52,7 @@ fn main() { match read_config() { Ok(conf) =>{ - let pulses: Arc> = Arc::new(AtomicCell::new(1)); + let pulses: Arc> = Arc::new(AtomicCell::new(0)); let pulses_counter = pulses.clone();