Giter VIP home page Giter VIP logo

node-leddriver's People

Contributors

fjw avatar jnovack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

node-leddriver's Issues

Fading

Would you consider a fading function?

I ask, because it would require an additional logic, another dependency and special consideration for time (which I'd still have to figure out).

My first attack path would be to use ChroMath.gradient to calculate the colors required to fade from one color to another.

This does leave me concerned about how to properly smooth over time. Each step would have to be perfectly timed to appear to be a smooth transition, is this possible with Node?

setTimeout is not guaranteed to be run exactly at those milliseconds. We could process.nextTick() it, but then we cannot control the speed of the fade. Additionally, sending anything to the spi-driver might actually cause a VERY tiny delay which could be introduced, throwing off the timing.

Thoughts?

9 RGB LED with TCL5947

First off, thanks for sharing this library!

As I need to control 9 rgb led, i'll need to hook up to 2 sets of TCL5947. Could you advice on how i can differentiate it in node?

driver.send() issue

Hi there. I'm having an issue with the driver.send() function in your library. I can't seem to call it more than twice when I run my script without getting a fatal error. Here's the error I get.

/home/pi/lightbar/node_modules/leddriver/leddriver.js:82
                return spi.send(this._getRegister());
                           ^
Error: can't send spi message
    at Object.obj.send (/home/pi/lightbar/node_modules/leddriver/leddriver.js:82:28)
    at null.<anonymous> (/home/pi/lightbar/leds.js:21:10)
    at wrapper [as _onTimeout] (timers.js:258:14)
    at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

And here's my code. It's very simple, I'm just trying to blink an LED. I'm sure I'm overlooking something simple but I just can't figure it out.

var LEDDRIVER = require("leddriver");
var driver = new LEDDRIVER(24, 12);

driver.pset(0, 0);
driver.send();

var i = 0;
setInterval(function() {
	if (i == 0) {
		driver.pset(0, 0);
		driver.send();
	} else {
		driver.pset(0, 1);
		driver.send();
	}
	if (i == 1) {
		i = 0;
	} else {
		i++;
	}
}, 500);

Thanks so much for any help you can provide.

12-channel PWM

This works PERFECTLY for my 24-Channel PWM (the one you purchased). However, the 12-channel PWM only has GND, VCC, V+, CI and DI (clock in, data in) whereas the 24-channel PWM has DIN, CLK, and LAT for control.

I'm struggling to figure out how to use the 12-channel (16-bit) PWM and which cables to use. Would you kindly help me figure out how to pin it out?

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.