Merge pull request #639 from pimoroni/docs/add-links

Update docs and add links
driver/aps6404
Hel Gibbons 2023-01-19 14:45:59 +00:00 zatwierdzone przez GitHub
commit db5004d51c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 44 dodań i 13 usunięć

Wyświetl plik

@ -89,7 +89,7 @@ We also maintain a C++/CMake boilerplate with GitHub workflows configured for te
## RP2040 Boards
* Plasma 2040 (LED strip driver) - https://shop.pimoroni.com/products/plasma-2040
* Interstate 75 (HUB75 driver) - https://shop.pimoroni.com/products/interstate-75
* Interstate 75 (HUB75 matrix driver) - https://shop.pimoroni.com/products/interstate-75
* Badger 2040 (E Ink badge) - https://shop.pimoroni.com/products/badger-2040
* Servo 2040 (18 Channel Servo Controller) - https://shop.pimoroni.com/products/servo-2040
* Motor 2040 (Quad Motor+Encoder Controller) - https://shop.pimoroni.com/products/motor-2040
@ -103,6 +103,8 @@ We also maintain a C++/CMake boilerplate with GitHub workflows configured for te
* Automation 2040 W Mini (inputs, outputs and a relay, 6-40V compatible) - https://shop.pimoroni.com/products/automation-2040-w-mini
* Plasma Stick 2040 W (bijou LED strip controller) - https://shop.pimoroni.com/products/plasma-stick-2040-w
* Galactic Unicorn (dazzling 53 x 11 LED matrix) - https://shop.pimoroni.com/products/galactic-unicorn
* Interstate 75 W (HUB75 matrix driver) - https://shop.pimoroni.com/products/interstate-75-w
* Inky Frame 4.0" (7-colour E Ink) - https://shop.pimoroni.com/products/inky-frame-4
## Breakouts

Wyświetl plik

@ -14,6 +14,7 @@
- [Wireless Examples](#wireless-examples)
- [Sunrise / Sunset](#sunrise--sunset)
- [Zoo Facts](#zoo-facts)
- [Other Resources](#other-resources)
## About Pico GFX Pack
@ -122,4 +123,11 @@ Find out more about Zoo Animal API here: https://zoo-animal-api.herokuapp.com/
- D = Show stats
- E = Fetch a different 5 animals
## Other Resources
Here are some GFX Pack community projects and resources that you might find useful! Note that code at the links below has not been tested by us and we're not able to offer support with it.
- :link: [Octopus Energy Monitor](https://github.com/MaverickUK/OctopusEnergyMonitorPicoW)

Wyświetl plik

@ -12,6 +12,7 @@
- [Weather Station (BME68X)](#weather-station-bme68x)
- [Wireless Examples](#wireless-examples)
- [Cheerlights](#cheerlights)
- [Other Resources](#other-resources)
## PicoGraphics
@ -64,10 +65,17 @@ Plug a [BME680](https://shop.pimoroni.com/products/bme680-breakout) or [BME688](
The wireless examples need `network_manager.py` and `WIFI_CONFIG.py` from the `common` directory to be saved to your Pico W. Open up `WIFI_CONFIG.py` in Thonny to add your wifi details (and save it when you're done).
You'll also need to install the `micropython-urllib.urequest` library using Thonny's 'Tools' > 'Manage Packages'.
You may also need to install the `micropython-urllib.urequest` library using Thonny's 'Tools' > 'Manage Packages'.
### Cheerlights
[cheerlights.py](cheerlights.py)
This Pico W example sets your Pico Explorer's screen (and optionally, a [RGB LED](https://shop.pimoroni.com/products/led-rgb-clear-common-cathode)) to the current #cheerlights colour.
## Other Resources
Here are some Pico Explorer community projects and resources that you might find useful! Note that code at the links below has not been tested by us and we're not able to offer support with it.
- :link: [PicoGraphics Zoomable Mandelbrot](https://github.com/ExperiMentor/PicoGraphics_Zoomable_Mandelbrot)

Wyświetl plik

@ -6,6 +6,7 @@ Pico Graphics replaces the individual drivers for displays- if you're been using
- [Setting up Pico Graphics](#setting-up-pico-graphics)
- [Supported Displays](#supported-displays)
- [Interstate75 and Interstate75W Display modes](#interstate75-and-interstate75w-display-modes)
- [Supported Graphics Modes (Pen Type)](#supported-graphics-modes-pen-type)
- [Supported Rotations](#supported-rotations)
- [Custom Pins](#custom-pins)
@ -21,6 +22,7 @@ Pico Graphics replaces the individual drivers for displays- if you're been using
- [Clipping](#clipping)
- [Clear](#clear)
- [Update](#update)
- [Get Bounds](#get-bounds)
- [Text](#text)
- [Changing The Font](#changing-the-font)
- [Drawing Text](#drawing-text)
@ -61,8 +63,9 @@ Bear in mind that MicroPython has only 192K of RAM available- a 320x240 pixel di
* 240x240 Square SPI LCD Breakout - `DISPLAY_LCD_240X240`
* 160x80 SPI LCD Breakout - `DISPLAY_LCD_160X80`
* 128x128 I2C OLED - `DISPLAY_I2C_OLED_128X128`
* Pico Inky Pack - 296x128 mono e-ink - `DISPLAY_INKY_PACK`
* Inky Frame - 600x447 7-colour e-ink - `DISPLAY_INKY_FRAME`
* Pico Inky Pack - 296x128 mono E ink - `DISPLAY_INKY_PACK`
* Inky Frame 5.7" - 600x448 7-colour E ink - `DISPLAY_INKY_FRAME`
* Inky Frame 4.0" - 640x400 7-colour E ink - `DISPLAY_INKY_FRAME_4`
* Pico GFX Pack - 128x64 mono LCD Matrix - `DISPLAY_GFX_PACK`
* Galactic Unicorn - 53x11 LED Matrix - `DISPLAY_GALACTIC_UNICORN`
* Interstate75 and 75W - HUB75 Matrix driver - `DISPLAY_INTERSTATE75_SIZEOFMATRIX` please read below!
@ -71,7 +74,7 @@ Bear in mind that MicroPython has only 192K of RAM available- a 320x240 pixel di
Both the Interstate75 and Interstate75W support lots of different sizes of HUB75 matrix displays.
The available display ssettings are listed here:
The available display settings are listed here:
* 32 x 32 Matrix - `DISPLAY_INTERSTATE75_32X32`
* 64 x 32 Matrix - `DISPLAY_INTERSTATE75_64X32`
@ -267,6 +270,14 @@ If you are using a Galactic Unicorn, then the process for updating the display i
galactic_unicorn.update(display)
```
#### Get Bounds
You can use `get_bounds()` to get the width and height of the display - useful for writing code that's portable across different displays.
```python
WIDTH, HEIGHT = display.get_bounds()
```
### Text
#### Changing The Font
@ -284,8 +295,8 @@ These are aligned from their top-left corner.
* `bitmap8`
* `bitmap14_outline`
Vector (Hershey) fonts.
These are aligned to their midline.
Vector (Hershey) fonts.
These are aligned horizontally (x) to their left edge, but vertically (y) to their midline excluding descenders [i.e., aligned at top edge of lower case letter m]. At `scale=1`, the top edge of upper case letters is 10 pixels above the specified `y`, text baseline is 10 pixels below the specified `y`, and descenders go down to 20 pixels below the specified `y`.
* `sans`
* `gothic`
@ -347,7 +358,7 @@ Draws an ampersand in a 16px tall, 2x scaled version of the 'bitmap8' font.
#### Line
To draw a line:
To draw a straight line at any angle between two specified points:
```python
display.line(x1, y1, x2, y2)
@ -412,12 +423,14 @@ Setting individual pixels is slow, but you can do it with:
display.pixel(x, y)
```
You can set a horiontal span of pixels a little faster with:
You can draw a horizontal span of pixels a little faster with:
```python
pixel_span(x, y, length)
display.pixel_span(x, y, length)
```
(use `display.line()` instead if you want to draw a straight line at any angle)
### Palette Management
Intended for P4 and P8 modes.
@ -427,7 +440,7 @@ You have a 16-color and 256-color palette respectively.
Set n elements in the palette from a list of RGB tuples:
```python
set_palette([
display.set_palette([
(r, g, b),
(r, g, b),
(r, g, b)
@ -437,7 +450,7 @@ set_palette([
Update an entry in the P4 or P8 palette with the given colour.
```python
update_pen(index, r, g, b)
display.update_pen(index, r, g, b)
```
This is stored internally as RGB and converted to whatever format your screen requires when displayed.
@ -445,7 +458,7 @@ This is stored internally as RGB and converted to whatever format your screen re
Reset a pen back to its default value (black, marked unused):
```python
reset_pen(index)
display.reset_pen(index)
```
#### Utility Functions