On boards such as the MCUDev Black STM32F407VET6, there are 2x user buttons.
In the board definition I've defined KEY0 as the main switch.
Is it worth updating pyb.Switch() to support multiple switches? eg.
pyb.Switch() == KEY0
pyb.Switch(1) == KEY0
pyb.Switch(2) == KEY1
Or is pyb.Switch deprecated in favour of just using machine.Pin and pin.irq()?
Update pyb.Switch() to support multiple buttons?
-
- Posts: 363
- Joined: Sun Apr 17, 2016 1:55 pm
Re: Update pyb.Switch() to support multiple buttons?
That's a good idea.