update pin

This commit is contained in:
2025-04-15 11:09:53 +02:00
parent 6a81b814cb
commit f29ced6b61
2 changed files with 3 additions and 3 deletions

View File

@@ -4,9 +4,9 @@ use rppal::gpio::{Gpio, Trigger};
pub fn pulse_counter(pulses: Arc<AtomicCell<u32>>) {
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");

View File

@@ -52,7 +52,7 @@ fn main() {
match read_config() {
Ok(conf) =>{
let pulses: Arc<AtomicCell<u32>> = Arc::new(AtomicCell::new(1));
let pulses: Arc<AtomicCell<u32>> = Arc::new(AtomicCell::new(0));
let pulses_counter = pulses.clone();