Metadata-Version: 2.1
Name: LightBerries
Version: 0.54.dev0
Summary: A wrapper for rpi_ws281x that does all the heavy lifting for you.
Home-page: https://github.com/joeferg425/ws281x_lightberries
Author: JoeFerg425
License: MIT
Keywords: raspberry pi rpi rpi_ws281x adafruit neopixel
Platform: UNKNOWN
Requires-Python: >=3.5
Description-Content-Type: text/markdown
Requires-Dist: Adafruit-Blinka (>=3.0.0)
Requires-Dist: RPi.GPIO (>=0.7.0)
Requires-Dist: adafruit-circuitpython-neopixel (==3.4.0)
Requires-Dist: numpy (>=1.15.1)
Requires-Dist: rpi-ws281x (==4.2.2)

# About:
Wrapper for rpi_ws281x (https://github.com/rpi-ws281x/rpi-ws281x-python) library that defines a bunch of colorful functions.

This library has only been tested on raspberry pi 2 and raspberry pi 3. The lights I have are ws2811 50ct off of amazon with a custom 5v power supply and level converter.

This library is intended for a string of lights not a matrix configuration.


# Installation:
	pip install lightberries-joeferg425


# Examples:

## Demo mode:
```python
# import the library
from LightBerries import LightFunction
# the number of pixels in the light string
PIXEL_COUNT = 100
# GPIO pin to use for PWM signal
GPIO_PWM_PIN = 18
# DMA channel
DMA_CHANNEL = 5
# frequency to run the PWM signal at
PWM_FREQUENCY = 800000
# brightness of LEDs in range [0.0, 1.0]
BRIGHTNESS = 0.5
# to understand the rest of these arguments read their documentation: https://github.com/rpi-ws281x/rpi-ws281x-python
GAMMA = None
LED_STRIP_TYPE = None
INVERT = False
PWM_CHANNEL = 0
# create the light-function object
lightFunction = LightFunction(ledCount=PIXEL_COUNT, pwmGPIOpin=GPIO_PWM_PIN, channelDMA=DMA_CHANNEL, frequencyPWM=PWM_FREQUENCY, channelPWM=PWM_CHANNEL, invertSignalPWM=INVERT, gamma=GAMMA, stripTypeLED=LED_STRIP_TYPE, ledBrightnessFloat=BRIGHTNESS, debug=True)
# choose a function
lightFunction.demo(secondsPerMode=5)
```
## Rainbow that scrolls across the lights:
```python
# the number of pixels in the light string
PIXEL_COUNT = 100
# GPIO pin to use for PWM signal
GPIO_PWM_PIN = 18
# DMA channel
DMA_CHANNEL = 5
# frequency to run the PWM signal at
PWM_FREQUENCY = 800000
# brightness of LEDs in range [0.0, 1.0]
BRIGHTNESS = 0.5
# to understand the rest of these arguments read their documentation: https://github.com/rpi-ws281x/rpi-ws281x-python
GAMMA = None
LED_STRIP_TYPE = None
INVERT = False
PWM_CHANNEL = 0
# create the light-function object
lightFunction = LightFunction(ledCount=PIXEL_COUNT, pwmGPIOpin=GPIO_PWM_PIN, channelDMA=DMA_CHANNEL, frequencyPWM=PWM_FREQUENCY, channelPWM=PWM_CHANNEL, invertSignalPWM=INVERT, gamma=GAMMA, stripTypeLED=LED_STRIP_TYPE, ledBrightnessFloat=BRIGHTNESS, debug=True)
# choose a function
lightFunction.useColorRainbow()
lightFunction.functionMarquee()
lightFunction.run()
```
## Raindrop function:
```python
# import the library
from LightBerries import LightFunction
# the number of pixels in the light string
PIXEL_COUNT = 100
# GPIO pin to use for PWM signal
GPIO_PWM_PIN = 18
# DMA channel
DMA_CHANNEL = 5
# frequency to run the PWM signal at
PWM_FREQUENCY = 800000
# brightness of LEDs in range [0.0, 1.0]
BRIGHTNESS = 0.5
# to understand the rest of these arguments read their documentation: https://github.com/rpi-ws281x/rpi-ws281x-python
GAMMA = None
LED_STRIP_TYPE = None
INVERT = False
PWM_CHANNEL = 0
# create the light-function object
lightFunction = LightFunction(ledCount=PIXEL_COUNT, pwmGPIOpin=GPIO_PWM_PIN, channelDMA=DMA_CHANNEL, frequencyPWM=PWM_FREQUENCY, channelPWM=PWM_CHANNEL, invertSignalPWM=INVERT, gamma=GAMMA, stripTypeLED=LED_STRIP_TYPE, ledBrightnessFloat=BRIGHTNESS, debug=True)
# choose a function
lightFunction.useColorRandom()
lightFunction.functionRaindrops()
lightFunction.run()
```


