update GU readmes

pull/559/head
helgibbons 2022-11-02 16:58:18 +00:00
rodzic 689326ac55
commit 347cd19ab9
2 zmienionych plików z 134 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,108 @@
# Galactic Unicorn MicroPython Examples <!-- omit in toc -->
Galactic Unicorn offers 53x11 bright RGB LEDs driven by Pico W's PIO in addition to a 1W amplifier + speaker, a collection of system and user buttons, and two Qw/ST connectors for adding external sensors and devices. Woha!
- link:[Galactic Unicorn store page](https://shop.pimoroni.com/products/galactic-unicorn)
Galactic Unicorn ships with MicroPython firmware pre-loaded, but you can download the most recent version at the link below (you'll want the `galactic-unicorn` image).
- [MicroPython releases](https://github.com/pimoroni/pimoroni-pico/releases)
- [Installing MicroPython](../../../setting-up-micropython.md)
- [Galactic Unicorn and PicoGraphics](#galactic-unicorn-and-picographics)
- [Examples](#examples)
- [Clock](#clock)
- [Eighties Super Computer](#eighties-super-computer)
- [Feature Test](#feature-test)
- [Feature Test With Audio](#feature-test-with-audio)
- [Fire Effect](#fire-effect)
- [Lava Lamp](#lava-lamp)
- [Nostalgia Prompt](#nostalgia-prompt)
- [Rainbow](#rainbow)
- [Scrolling Text](#scrolling-text)
- [Wireless Examples](#wireless-examples)
- [Cheerlights Over Time](#cheerlights-over-time)
- [Galactic Paint](#galactic-paint)
## Galactic Unicorn and PicoGraphics
The easiest way to start displaying stuff on Galactic Unicorn is using our Galactic Unicorn module (which contains a bunch of helpful functions for interacting with the buttons, adjusting brightness and suchlike) and our PicoGraphics library, which is chock full of useful functions for drawing on the LED matrix.
- [Galactic Unicorn function reference](../../modules/picographics/README.md)
- [PicoGraphics function reference](../../modules/galactic_unicorn/README.md)
## Examples
### Clock
[clock.py](clock.py)
Clock example with (optional) NTP synchronization.
### Eighties Super Computer
[eighties_super_computer.py](eighties_super_computer.py)
todo
### Feature Test
[feature_test.py](feature_test.py)
todo
### Feature Test With Audio
[feature_test_with_audio.py](feature_test_with_audio.py)
todo
### Fire Effect
[fire_effect.py](fire_effect.py)
todo
### Lava Lamp
[lava_lamp.py](lava_lamp.py)
todo
### Nostalgia Prompt
[nostalgia_prompt.py](nostalgia_prompt.py)
todo
### Rainbow
[rainbow.py](rainbow.py)
Some good old fashioned rainbows!
### Scrolling Text
[scrolling_text.py](scrolling_text.py)
todo
## Wireless Examples
### Cheerlights Over Time
[cheerlights_over_time.py](cheerlights_over_time.py)
todo
This wireless example needs `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).
- [micropython/examples/common](../../examples/common)
### Galactic Paint
[galactic_paint](galactic_paint)
todo

Wyświetl plik

@ -2,6 +2,8 @@
Galactic Unicorn offers 53x11 bright RGB LEDs driven by Pico W's PIO in addition to a 1W amplifier + speaker, a collection of system and user buttons, and two Qw/ST connectors for adding external sensors and devices. Woha!
You can buy one here: https://shop.pimoroni.com/products/galactic-unicorn
## These are not your everyday RGB LEDs!
Internally Galactic Unicorn applies gamma correction to the supplied image data and updates the display with 14-bit precision resulting in extremely linear visual output - including at the low end.
@ -38,6 +40,7 @@ Drawing is primarily handled via our [PicoGraphics](https://github.com/pimoroni/
- [`stop_playing()`](#stop_playing)
- [Constants](#constants)
- [`WIDTH` & `HEIGHT`](#width--height)
- [Using Breakouts](#using-breakouts)
# Example Program
@ -250,4 +253,27 @@ For example:
```python
num_pixels = gu.WIDTH * gu.HEIGHT
print(num_pixels)
```
## Using Breakouts
Galactic Unicorn has two Qw/ST (Qwiic/STEMMA QT) connectors. Breakouts with Qw/ST connectors, can be plugged straight in with a :link:[JST-SH to JST-SH cable](https://shop.pimoroni.com/products/jst-sh-cable-qwiic-stemma-qt-compatible?variant=31910609813587). You can connect I2C Breakout Garden breakouts without Qw/ST connectors using a :link:[JST-SH to JST-SH cable](https://shop.pimoroni.com/products/jst-sh-cable-qwiic-stemma-qt-compatible?variant=31910609813587) and a :link:[Qw/ST to Breakout Garden adaptor](https://shop.pimoroni.com/products/stemma-qt-qwiic-to-breakout-garden-adapter).
- [List of breakouts currently supported in our C++/MicroPython build](https://github.com/pimoroni/pimoroni-pico#breakouts)
Galactic Unicorn uses GP4 and GP5 for its I2C interface. You can use the constants in the shared `pimoroni` module to set up the I2C interface:
```python
from pimoroni_i2c import PimoroniI2C
from pimoroni import PINS_BREAKOUT_GARDEN
i2c = PimoroniI2C(**PINS_BREAKOUT_GARDEN)
```
Alternatively, you can specify the pin numbers directly:
```python
from pimoroni_i2c import PimoroniI2C
i2c = PimoroniI2C(sda=(4), scl=(5))
```