Fix syntax to actually create gpio and pin right
This commit is contained in:
parent
86bc40c981
commit
57b199dbfd
1 changed files with 2 additions and 2 deletions
|
@ -8,8 +8,8 @@ impl GpioPins{
|
|||
pub fn new() -> Self {
|
||||
let mut output = Self { unassigned_addresses:Vec::new() };
|
||||
for pin in RELAY_ADDRESSES.iter(){
|
||||
let gpio_object = rppal::gpio::Gpio::new();
|
||||
let pin_object = gpio_object.new.get(pin).unwrap().into_output();
|
||||
let gpio_object = rppal::gpio::Gpio::new().unwrap();
|
||||
let pin_object = gpio_object.get(pin).unwrap().into_output();
|
||||
pin_object.set_low();
|
||||
output.unassigned_addresses.push(*pin);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue