Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
akira-cn committed Aug 2, 2016
1 parent 0636b0e commit c5aa3e5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
9 changes: 7 additions & 2 deletions README.md
Expand Up @@ -97,7 +97,7 @@ process.on("SIGINT", function(){

#### Methods

* [Gpio(pin, activeLow) - Constructor](#gpiopinactivelow)
* [Gpio(pin[, activeLow]) - Constructor](#gpiopin-activelow)
* [open(mode[, state]) - Export the GPIO to userspace](#openmode-state)
* [close() - Unexport the GPIO](#close)
* [read() - Get GPIO value](#read)
Expand All @@ -106,6 +106,7 @@ process.on("SIGINT", function(){
* [sleep(ms[,async]) - Sleep for a few milliseconds](#sleepmsasync)
* [createReadStream(pin[, options]) - Create a readable stream from a pin](#createreadstreampin-options)
* [createWriteStream(pin[, options]) - Create a writable stream for a pin](#createreadstreampin-options)
* [group(pins[, activeLow])] - Create a group of GPIOs(#grouppins-activeLow)

#### Statics

Expand Down Expand Up @@ -143,7 +144,7 @@ process.on("SIGINT", function(){

### Class GpioGroup

* [GpioGroup(pins, activeLow) - Constructor](#gpiopinactivelow)
* [GpioGroup(pins[, activeLow]) - Constructor](#gpiogrouppins-activelow)

---

Expand Down Expand Up @@ -303,6 +304,10 @@ process.on("SIGINT", function(){
});
```

##### group(pins[, activeLow])

Create GpioGroup instance. See [GpioGroup(pins[, activeLow]) - Constructor](#gpiogrouppins-activelow).

---

### Properties
Expand Down
3 changes: 3 additions & 0 deletions lib/index.js
Expand Up @@ -12,6 +12,9 @@ Gpio.createReadStream = function(pin, options){
Gpio.createWriteStream = function(pin, options){
return new WriteStream(pin, options);
}
Gpio.group = function(pins, activeLow){
return new GpioGroup(pins, activeLow);
}

var rpio2 = {
init: rpio.init,
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "rpio2",
"version": "0.3.2",
"version": "0.4.1",
"description": "Control Raspberry Pi GPIO pins with node.js. Fast and easy to use.",
"main": "lib/index.js",
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions travis_pre_install.sh
@@ -1,5 +1,5 @@
#!/bin/sh
sed -i '/"rpio": "^0.9.11"/d' ./package.json
sed -i '/"rpio": .*/d' ./package.json

# for mac
# sed -i "" '/"rpio": "^0.9.11"/d' ./package.json
# sed -i "" '/"rpio": .*/d' ./package.json

0 comments on commit c5aa3e5

Please sign in to comment.