Skip to content

Commit

Permalink
updated PicoGraphics README and .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmcaleer committed Jun 20, 2022
1 parent f101ffd commit 952cb4e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@

**/build
.vscode

# Apple filesystem cruft
.DS_Store
venv
15 changes: 14 additions & 1 deletion micropython/modules/picographics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ All SPI LCDs support 0, 90, 180 and 270 degree rotations.
Eg:

```python
display = PicoGraphics(display=PICO_DISPLAY, roation=90)
display = PicoGraphics(display=PICO_DISPLAY, rotate=90)
```

### Custom Pins
Expand Down Expand Up @@ -362,12 +362,25 @@ We've prepared some RGB332-compatible sprite assets for you, but you can use `sp

#### Loading Sprites

You'll need to include the [pen_type](#supported-graphics-modes-pen-type) in the import statement, and define the pen_type before using loading the spritesheet:

``` python
from picographics import PicoGraphics, PEN_RGB565, PEN_RGB332

display = PicoGraphics(display=PICO_DISPLAY, pen_type=PEN_RGB332)
```
Use Thonny to upload your `spritesheet.rgb332` file onto your Pico. Then load it into Pico Graphics:

```python
display.load_spritesheet("s4m_ur4i-dingbads.rgb332")
```

and then update the display, to show the sprite:

```python
display.update()
```

#### Drawing Sprites

And finally display a sprite:
Expand Down

0 comments on commit 952cb4e

Please sign in to comment.