update pin
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user