kopia lustrzana https://github.com/pimoroni/pimoroni-pico
Update interstate75.md
rodzic
2a1c1e464f
commit
96c83f8ae4
|
@ -47,12 +47,21 @@ To read a specific input, the `interstate75` module contains these handy constan
|
|||
* `SWITCH_A` = `0`
|
||||
* `SWITCH_B` = `1`
|
||||
|
||||
The Interstate 75 (non W) uses the boot button instead of `SWITCH_B`
|
||||
|
||||
* `SWITCH_BOOT` = `2`
|
||||
|
||||
```python
|
||||
if board.switch_pressed(SWITCH_A):
|
||||
# Do something interesting here!
|
||||
|
||||
# Either for Interstate 75W
|
||||
if board.switch_pressed(SWITCH_B):
|
||||
# Do something else even more interesting here!
|
||||
|
||||
# Or for Interstate 75
|
||||
if board.switch_pressed(SWITCH_BOOT):
|
||||
# Do something else even more interesting here!
|
||||
```
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue