Giter VIP home page Giter VIP logo

open-smart-rgb-led-strip-driver-for-raspberry-pi's Introduction

Open-Smart RGB LED Strip Driver for the Raspberry Pi

This code was forked from https://github.com/schlank/Catalex-Led-Strip-Driver-Raspberry-Pi

This code is used to control RGB strips using the Open-Smart Arduino controller that I obtained from DealExtreme: http://www.dx.com/p/full-color-rgb-led-strip-driver-module-for-arduino-blue-black-314667

A test rig was created for testing the software before creating the final unit. See TestRig.md.

LEDStrip Class

Place ledstrip.py into the same directory as your code.

In your code, import the file:

from ledstrip import LEDStrip

Create a new LED Strip which uses your chosen pins (CLK and DAT) with, e.g.:

CLK = 17
DAT = 18
strip = LEDStrip(CLK, DAT)

Set the colour of the LED strip with

strip.setcolorrgb(red, green, blue):

The following methods are public:

setcolourrgb(r, g, b) - Sets the LED strip to colour rgb where r, g, b are in the range 0 to 255
setcolourwhite() - Sets the strip to white
setcolourred() - Sets the strip to Red
setcolourgreen() - Sets the strip to Green
setcolourblue() - Sets the strip to Blue
setcolouroff() - Turns the strip off
setcolourhex('hex') - Sets the LED strip to the hex colour 'hex' in range '000000' to 'FFFFFF'

open-smart-rgb-led-strip-driver-for-raspberry-pi's People

Contributors

geekytim avatar gshiftlabs-dburke avatar

Watchers

 avatar

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.