dmnte
1
Im currently trying to make a thermostat type thing with temp up and down buttons, I can currently detect one button with:
temp_up.with_exported( || { code }
But it seems like I can only use one pin within this which is temp_up. How can I use more pins within this ?
dmnte
2
For instance I have my pins setup and then use.
pin1.with_exported(|| {
pin1.set=direction(Direction::In).unwrap();
pin2.set=direction(Direction::In).unwrap();
pin3.set=direction(Direction::Out).unwrap();
pin3.set=direction(Direction::Out).unwrap();
loop {
do stuff
}
I only have problems putting the second pin ie a second in pin. If I just have 1 input pin and 2 output pins its fine.