Giter Club home page Giter Club logo

piled's Introduction

PiLED 0.0.1

Based on FastLED 3.1.6

This is my attempt at porting the FastLED library (https://github.com/FastLED/FastLED) for use on the RaspberryPi. I understand the reasoning for not including devices like the Pi in FastLed because of timing issues and driving certain kinds of light strips. I only wanted to drive APA102 (Dotstar) leds, which don't have strict timing requirements for their data signal.

Small disclaimer: This is not an exact/direct port. I have copied as much as I can from FastLED verbatim, but there are some missing features. This library is only set up to drive APA102 (Dotstar) LED strips, and it can only drive one strand at a time. There are a few reasons for this: 1. I am only interested in that kind of light strip, 2. I have practically no development experience on the Pi, so this is also a project to help me learn to develop on the Pi. 3. I am not a C/C++ developer, so I'm trying to get just the basics working. This might change in the future as I develop my skills or someone decides to contribute.

I have done my best to make this library work as close as possible to FastLED so that their documentation should be very helpful. The only difference so far is initializing the library. After that, all functions that manipulate colors will work the same.

Dependencies

This project depends on WiringPi (http://wiringpi.com/), which appears to be bundled in Raspbian, so no action is needed if you are building on your Raspberry Pi.

Wiring

Currently, you cannot specify pins for the data and clock. PiLED uses the SPI connections, so you will use the MOSI pin for the data, and SCLK pin for the clock.

Quick Start

Here's a quick example providing some blinking code:

#include <wiringPi.h>
#include "PiLED.h"

#define NUM_LEDS 1
 
CRGB leds[NUM_LEDS];

int main() {
	wiringPiSetup();
	
	PiLED piLED(leds, NUM_LEDS);
	
	for(;;) {
		leds[0] = CRGB::White; piLED.show(); delay(30); 
		leds[0] = CRGB::Black; piLED.show(); delay(30);
	}

	return 0;
}

piled's People

Contributors

ahettlin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

piled's Issues

Compiling issues

Hi,

thanks for sharing. Can you provide more detail on how to get this running on a pi?
Running "make" results in errors due to missing references in the Makefile (nbprojects folder)

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.