pull/39/head
Roger Thomas 2021-01-28 09:07:31 +00:00 zatwierdzone przez Philip Howard
rodzic 2a7f8f4781
commit 24228b150f
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -106,7 +106,7 @@ Reads the GPIO pin connected to one of Pico Unicorn's buttons, returning `True`
picounicorn.is_pressed(button)
```
The button vaule should be a number denoting a pin, and constants `picounicorn.BUTTON_A`, `picounicorn.BUTTON_B`, `picounicorn.BUTTON_X` and `picounicorn.BUTTON_Y` are supplied to make it easier. e:
The button value should be a number denoting a pin, and constants `picounicorn.BUTTON_A`, `picounicorn.BUTTON_B`, `picounicorn.BUTTON_X` and `picounicorn.BUTTON_Y` are supplied to make it easier. e:
```python
is_a_button_pressed = picounicorn.is_pressed(picounicorn.BUTTON_A)
@ -121,4 +121,4 @@ width = picounicorn.get_width()
height = picounicorn.get_height()
```
This is useful where you're looping through the rows and columns to display a pattern- such as a rainbow using `hsv_to_rgb`.
This is useful where you're looping through the rows and columns to display a pattern- such as a rainbow using `hsv_to_rgb`.