Skip to content

Commit

Permalink
prepare first pre-release
Browse files Browse the repository at this point in the history
 - updated version
 - add LICENSE
 - move all repositories to the raspberry-node organization
  • Loading branch information
Martin Schuhfuss committed Nov 19, 2014
1 parent 36b8414 commit 1989893
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "src/rpi_ws281x"]
path = src/rpi_ws281x
url = [email protected]:usefulthink/rpi_ws281x.git
url = [email protected]:raspberry-node/rpi_ws281x.git
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014 Martin Schuhfuß

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# rpi-ws281x-native – controlling ws281x-LEDs with node.js
# control ws281x-LEDs with node.js

This module provides native bindings to the [rpi_ws281x](https://github.com/jgarff/rpi_ws281x)
library by Jeremy Garff.

> if you happen to know C++, i would really appreciate any help and feedback on this module.
> if you happen to know C++ and node/V8, I would really appreciate any help and feedback on this module.
> There is certainly lots of room for improvement.
This module provides native bindings to the [rpi_ws281x](https://github.com/jgarff/rpi_ws281x)
library by Jeremy Garff to provide a very basic set of functions to write data to a strip of
ws2811/ws2812 LEDs. **will only run on the Raspberry Pi.**

## setup

Expand All @@ -16,18 +16,11 @@ this module is available via npm:
if you prefer installing from source:

npm install -g node-gyp
git clone --recursive https://github.com/usefulthink/node-rpi-ws281x-native.git
git clone --recursive https://github.com/raspberry-node/node-rpi-ws281x-native.git
cd rpi-ws281x-native
node-gyp rebuild


## testing basic functionality

connect the WS2812-strip to the raspberry-pi as described [here](https://learn.adafruit.com/neopixels-on-raspberry-pi/wiring)
and run the command `node examples/rainbow.js <numLeds>`.
You should now see some rainbow-colors animation on the LED-strip.


## usage

this module exports only three functions to send data to the LED-String.
Expand Down Expand Up @@ -57,17 +50,24 @@ exports = {
};
```

## testing basic functionality

connect the WS2812-strip to the raspberry-pi as described [here](https://learn.adafruit.com/neopixels-on-raspberry-pi/wiring)
and run the command `node examples/rainbow.js <numLeds>`.
You should now see some rainbow-colors animation on the LED-strip.


## hardware

There is a guide over at [adafruit.com](https://learn.adafruit.com/neopixels-on-raspberry-pi) on how
to get the hardware up and running. Essentially, you need the raspberry-pi, a logic-level converter
to shift the output-voltage of the raspberry GPIO from 3.3V up to 5V (should be fast enough to handle 800kHz,
There is a guide [over at adafruit.com](https://learn.adafruit.com/neopixels-on-raspberry-pi) on how
to get the hardware up and running. Essentially, you need the Raspberry Pi, a logic-level converter
to shift the output-voltage of the GPIO from 3.3V up to 5V (should be fast enough to handle 800kHz,
the guide mentions the 74AHCT125, mine is an 74HCT125N) and of course an LED-Strip or other types of WS2812-LEDs.

To connect all that together, I'd recommend buying a small breadboard and some jumper-wires.
Also, consider buing a 5V power-supply that can deliver up to 60mA per LED (so you'll need 6A to fully power 100 LEDs).
For smaller applications, a decent USB-charger should do.

You can buy everything you need at adafruit or any other electronics reseller
(germany: check [conrad electronic](http://www.conrad.de) or [watterott](http://watterott.com),
(germany: check [conrad electronic](http://www.conrad.de) or [watterott](http://watterott.com) – this is
where i bought most of my stuff).
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rpi-ws281x-native",
"version": "0.0.2",
"version": "0.1.0",
"description": "(raspberry-pi *only*) native bindings to control a strip of WS281x-LEDs with node.js",
"keywords": [
"raspberry",
Expand All @@ -13,11 +13,11 @@
"engines": { "node": ">=0.10.33" },
"repository": {
"type": "git",
"url": "git://github.com/usefulthink/node-rpi-ws281x-native.git"
"url": "git://github.com/raspberry-node/node-rpi-ws281x-native.git"
},
"author": "Martin Schuhfuss <[email protected]>",
"homepage": "https://github.com/usefulthink/node-rpi-ws281x-native",
"bugs": "https://github.com/usefulthink/node-rpi-ws281x-native/issues",
"homepage": "https://github.com/raspberry-node/node-rpi-ws281x-native",
"bugs": "https://github.com/raspberry-node/node-rpi-ws281x-native/issues",
"license": "MIT",
"dependencies": {},
"devDependencies": {}
Expand Down
2 changes: 1 addition & 1 deletion src/rpi_ws281x
Submodule rpi_ws281x updated 0 files

0 comments on commit 1989893

Please sign in to comment.