Giter Site home page Giter Site logo

fschrempf / py-neopixel-spidev Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 1.0 33 KB

A Python module to interface addressable WS2812 (aka NeoPixel) LEDs via the SPIdev driver in Linux

License: MIT License

Python 100.00%
adafruit-neopixel py-neopixel-spidev spi ws2812 spidev linux neopixel

py-neopixel-spidev's Introduction

Python NeoPixel SPIdev

The py-neopixel-spidev Python module can be used to control WS2812 addressable RGB LEDs via SPI on Linux devices using the generic Linux SPIdev driver.

Only the MOSI signal of the SPI bus is used to control the DIN of the chained LEDs. To emulate the protocol for the LEDs, each bit of LED data is made up of 4 SPI bits.

Dependencies

The following Python modules are needed:

Attributions

This module barely contains any new code, but mainly bundles code from existing projects for easier usage. Thanks to all the authors and contributors.

Adafruit CircuitPython Pypixelbuf

We reuse the Pixelbuf class from Adafruit CircuitPython Pypixelbuf.

File: lib/pixelbuf.py
License: MIT
Copyright: Copyright (c) 2019-2020 Roy Hooper
Authors: Damien P. George, Limor Fried, Scott Shawcroft, Roy Hooper

Adafruit CircuitPython NeoPixel

Further we use the NeoPixel class from Adafruit CircuitPython NeoPixel with some slight modifications to use the SPIdev bus as backend.

File: lib/neopixel_spidev.py
License: MIT
Copyright: Copyright (c) 2016 Damien P. George, Copyright (c) 2017 Scott Shawcroft for Adafruit Industries, Copyright (c) 2019 Carter Nelson, Copyright (c) 2019 Roy Hooper
Authors: Damien P. George, Scott Shawcroft, Carter Nelson, Roy Hooper

ws2812-spi

To emulate the protocol data, we use the code from the ws2812-spi project.

File: lib/neopixel_spi_write.py
License: AGPL
Author: joosteto

Usage

See the examples in examples/ and the docs for the Adafruit NeoPixel class.

Copyright

Copyright (c) 2020 Kontron Electronics GmbH
Author: Frieder Schrempf

License

The code is licensed under the MIT license, unless the source code files specify a different license.

py-neopixel-spidev's People

Contributors

fschrempf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

kluver

py-neopixel-spidev's Issues

RGBW example

Could an RGBW example be included? I can't figure out how to make the LEDs white using the 255 range shown in the example.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.