pimoroni-pico/micropython/examples/stellar_unicorn
thirdr b499296867 added amp enable to audio.py 2024-03-27 14:38:01 +00:00
..
audio added amp enable to audio.py 2024-03-27 14:38:01 +00:00
http_text Stellar: adjust html text example 2023-07-02 15:14:25 +01:00
launch Stellar: Tweak & tidy examples. 2023-05-31 13:54:34 +01:00
numpy Stellar: Refined stalemate detection in Life. 2023-06-01 20:21:24 +01:00
stellar_paint Copied Cosmic MPy examples to Stellar 2023-05-30 12:42:27 +01:00
weather Stellar: add pizazz to weather example 2023-07-02 17:48:53 +01:00
README.md Added light sensor example to the su 2023-08-02 01:15:38 +01:00
cheerlights_history.py Stellar: Tweak & tidy examples. 2023-05-31 13:54:34 +01:00
clock.py stellar: correct path to font 2023-08-21 14:28:08 +01:00
co2.py stellar: correct path to 3x5 font 2023-08-21 14:16:25 +01:00
eighties_super_computer.py Stellar: Tweak & tidy examples. 2023-05-31 13:54:34 +01:00
encoder_wheel.py stellar: add encoder wheel demo 2023-07-03 12:15:12 +01:00
exchange_ticker.py Stellar: adjust exchange_ticker.py 2023-07-02 19:17:24 +01:00
feature_test.py Copied Cosmic MPy examples to Stellar 2023-05-30 12:42:27 +01:00
feature_test_with_audio.py Copied Cosmic MPy examples to Stellar 2023-05-30 12:42:27 +01:00
fire_effect.py Copied Cosmic MPy examples to Stellar 2023-05-30 12:42:27 +01:00
lava_lamp.py Adjust lava_lamp.py 2023-06-21 16:50:21 +01:00
light_sensor.py Minor formatting changes 2023-08-03 15:26:24 +01:00
melody_maker.py Copied Cosmic MPy examples to Stellar 2023-05-30 12:42:27 +01:00
nostalgia_prompt.py Copied Cosmic MPy examples to Stellar 2023-05-30 12:42:27 +01:00
rainbow.py Copied Cosmic MPy examples to Stellar 2023-05-30 12:42:27 +01:00
scrolling_text.py Copied Cosmic MPy examples to Stellar 2023-05-30 12:42:27 +01:00
thermometer_bme68x.py stellar: lint BME280/68x examples 2023-07-03 14:34:10 +01:00
thermometer_bme280.py stellar: lint BME280/68x examples 2023-07-03 14:34:10 +01:00
thermometer_pico.py Stellar: correct typo 2023-07-03 13:18:18 +01:00
today.py Stellar: Tweak & tidy examples. 2023-05-31 13:54:34 +01:00

README.md

Stellar Unicorn MicroPython Examples

About Stellar Unicorn

Stellar Unicorn offers 16x16 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!

Stellar Unicorn ships with MicroPython firmware pre-loaded, but you can download the most recent version at the link below (you'll want the stellar-unicorn image).

Stellar Unicorn and PicoGraphics

The easiest way to start displaying cool stuff on Stellar Unicorn is using our Stellar 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.

Examples

Clock

clock.py

Clock example with (optional) NTP synchronization. You can adjust the brightness with LUX + and -, and resync the time by pressing A.

This example uses a custom tiny bitmap font, find 3x5.bitmapfont in fonts and copy it to your Pico W.

Eighties Super Computer

eighties_super_computer.py

Random LEDs blink on and off mimicking the look of a movie super computer doing its work in the eighties. You can adjust the brightness with LUX + and -.

Feature Test

feature_test.py

Displays some text, gradients and colours and demonstrates button use. You can adjust the brightness with LUX + and -.

Feature Test With Audio

feature_test_with_audio.py

Displays some text, gradients and colours and demonstrates button use. Also demonstrates some of the audio / synth features.

  • Button A plays a synth tune
  • Button B plays a solo channel of the synth tune
  • Button C plays a sinewave (it's frequency can be adjusted with VOL + and -)
  • Button D plays a second sinewave (it's frequency can be adjusted with LUX + and -)
  • Sleep button stops the sounds

Fire Effect

fire_effect.py

A pretty, procedural fire effect. Switch between landscape fire and vertical fire using the A and B buttons! You can adjust the brightness with LUX + and -.

Lava Lamp

lava_lamp.py

A 70s-tastic, procedural rainbow lava lamp. You can adjust the brightness with LUX + and -.

Light Sensor

light_sensor.py

Reads data from the on board light sensor and displays the brightness level of the environment. The display is by default set to auto brightness i.e reacts to the brightness of the environment.

  • Button A turns auto brightness off
  • Button B turns auto brightness on

Nostalgia Prompt

nostalgia_prompt.py

A collection of copies of classic terminal styles including C64, MS-DOS, Spectrum, and more. Images and text are drawn pixel by pixel from a pattern of Os and Xs. You can adjust the brightness with LUX + and -.

Rainbow

rainbow.py

Some good old fashioned rainbows! You can adjust the cycling speed with A and B, stripe width with C and D, hue with VOL + and -, and the brightness with LUX + and -. The sleep button stops the animation (can be started again with A or B).

Scrolling Text

scrolling_text.py

Display scrolling wisdom, quotes or greetz. You can adjust the brightness with LUX + and -.

Thermometer

thermometer_pico.py

Shows the temperature (from the Pico W's internal sensor) against an appropriately coloured pulsing blob.

Today

today.py

Calendar example with (optional) NTP synchronization. You can adjust the brightness with LUX + and -, and resync the date by pressing C.

Wireless Examples

These examples need WIFI_CONFIG.py and network_manager.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).

Cheerlights History

cheerlights_history.py

Updates one pixel every two minutes to display the most recent #Cheerlights colour. Discover the most popular colours over time, or use it as an avant garde (but colourful) 16 hour clock! Find out more about the Cheerlights API at https://cheerlights.com/

You can adjust the brightness with LUX + and -.

Stellar Paint

stellar_paint

Draw on your Stellar Unicorn from another device in real time, over wifi!

This example needs the micropython-phew and microdot libraries (you can install these using Thonny's 'Tools > Manage Packages').

Exchange Ticker

exchange_ticker.py

This example uses the Coinbase open API to collect the current exchange rates of various cryptocurrencies.

Press A to change to a different base exchange currency.

HTTP Text

http_text

Display scrolling wisdom, quotes or greetz... from another computer or device!

You can adjust the brightness with LUX + and -.

Requires logging.mpy and tinyweb from micropython/examples/common - copy these into the lib folder on your Pico W. You'll also need index.html to be saved alongside html_text.py.

Weather

weather

Display current weather data from the Open-Meteo weather API. Make sure to copy across the icons folder to your Unicorn.

Buttons: A - show / hide temperature B - swap between Celsius and Fahrenheit C - randomly select a weather icon D - add rainbows LUX + and - adjust brightness

NumPy Examples

numpy

The examples in the folder use numpy-like array functions contained in the ulab library for super fast graphical effects.

Other Examples

These examples use additional hardware.

CO2

co2.py

Add a SCD41 sensor breakout to make an carbon dioxide detector. Press A, B and C to switch between modes.

This example uses a custom tiny bitmap font, find 3x5.bitmapfont in fonts and copy it to your Pico W.

Encoder Wheel

encoder_wheel.py

This example uses RGB Encoder Wheel breakout to make an RGB colour picker. Use the encoder wheel to pick a hue and view the RGB breakdown of that colour on the Unicorn display (you can adjust saturation and brightness using the buttons on the breakout too).

Thermometer (BME280)

thermometer_bme280.py

Shows temperature, humidity and pressure (from a BME280 sensor breakout) against an appropriately coloured pulsing blob.

Thermometer (BME68x)

thermometer_bme68x.py

Shows temperature, humidity and pressure (from a BME680 or BME688 sensor breakout) against an appropriately coloured pulsing blob.

Launch (Demo Reel)

launch

If you want to get the demo reel that Stellar Unicorn ships with back, copy the contents of this launch folder to your Pico W.