pimoroni-pico/micropython/examples/plasma_stick
Hel Gibbons d9587f06fa
Update README.md
2022-10-25 14:25:55 +01:00
..
README.md Update README.md 2022-10-25 14:25:55 +01:00
alternating-blinkies.py change default colour order 2022-10-19 16:31:36 +01:00
cheerlights.py change default colour order 2022-10-19 16:31:36 +01:00
co2.py change default colour order 2022-10-19 16:31:36 +01:00
encoder.py change default colour order 2022-10-19 16:31:36 +01:00
fire.py change default colour order 2022-10-19 16:31:36 +01:00
moon.py change default colour order 2022-10-19 16:31:36 +01:00
moon_rtc.py change default colour order 2022-10-19 16:31:36 +01:00
pir.py change default colour order 2022-10-19 16:31:36 +01:00
rainbows.py change default colour order 2022-10-19 16:31:36 +01:00
thermometer_bme280.py change default colour order 2022-10-19 16:31:36 +01:00
thermometer_pico.py change default colour order 2022-10-19 16:31:36 +01:00
weather.py change default colour order 2022-10-19 16:31:36 +01:00

README.md

Plasma Stick MicroPython Examples

About Plasma Stick

Plasma Stick 2040 W is a compact controller for WS2812 strip, powered by Raspberry Pi Pico W and perfect for easy, seasonal lighting. It has built in wireless connectivity, courtesy of the onboard Pico W.

You can buy one on its own or in a kit:

Plasma Stick ships with MicroPython firmware pre-loaded, but you can download the most recent version at the link below (you'll want the pimoroni-picow image).

Plasma Library

You can control your WS2812 / NeoPixel™ strip using our handy MicroPython Plasma library.

Note that the examples in this directory default to a RGB colour order to match the LEDs in the Wireless Plasma Kit. If you're using different LEDs you may need to adjust the colour order in your code - most of the other addressable LEDs we sell are GRB.

Using Breakouts

Plasma Stick has a Qw/ST (Qwiic/STEMMA QT) connector. Breakouts with Qw/ST connectors, can be plugged straight in with a JST-SH to JST-SH cable. You can connect I2C Breakout Garden breakouts without Qw/ST connectors using a JST-SH to JST-SH cable and a Qw/ST to Breakout Garden adaptor.

Plasma Stick uses GP4 and GP5 for its I2C interface. You can use the constants in the shared pimoroni module to set up the I2C interface:

from pimoroni_i2c import PimoroniI2C
from pimoroni import PINS_BREAKOUT_GARDEN

i2c = PimoroniI2C(**PINS_BREAKOUT_GARDEN)

Alternatively, you can specify the pin numbers directly:

from pimoroni_i2c import PimoroniI2C

i2c = PimoroniI2C(sda=(4), scl=(5))

Basic Examples

Alternating Blinkies

alternating-blinkies.py

A simple example with two alternating colours, great for festive lights!

Fire

fire.py

A simple 🔥 fire effect example 🤘 (warning, flashy).

Moon

moon.py

Spooky moon simulator - the LEDs will get brighter as midnight approaches! Needs to be run from Thonny to get the correct time.

Rainbows

rainbows.py

Some good old fashioned rainbows!

Thermometer

thermometer_pico.py

Reads the temperature from the Pico W's internal temperature sensor and changes the LED strip an appropriate colour.

Advanced Examples

These examples require additional hardware.

CO2

co2.py

Reads CO2 level from a SCD41 CO2 breakout and turns the LED strip an appropriate colour.

Encoder

encoder.py

Adjust the colour of your LEDs easily with an RGB Encoder breakout.

Moon (RTC)

moon_rtc.py

Spooky moon simulator - the LEDs will get brighter as midnight approaches! Gets the time from a RV3028 RTC breakout.

PIR

pir.py

Connect a PIR motion sensor and trigger some ominous effects. We like these ones - we connected ours to the QwST connector using this cable and some socket to socket jumper jerky.

Thermometer (BME280)

thermometer_bme280.py

Reads the temperature from a BME280 breakout and changes the LED strip an appropriate colour.

Wireless Examples

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).

Cheerlights

cheerlights.py

Sets your LED strip to the current #cheerlights colour. Find out more about the Cheerlights API at [https://cheerlights.com/].

Weather

weather.py

This Plasma Stick example connects to Open Meteo to access the current weather conditions. It then does some cool weather appropriate stuff with LEDs. Find out more about the Open Meteo API at [https://open-meteo.com].