rc

relay-controller

This's relay controller for Raspberry Pi

Showing:

Popularity

Downloads/wk

6

GitHub Stars

0

Maintenance

Last Commit

2mos ago

Contributors

1

Package

Dependencies

0

Size (min+gzip)

0.7KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

relay-controller

This's relay controller for Raspberry Pi

The initial version

It can control open,close,toggle,openAt,closeAt and toggleAt

First

  1. Install gpio-admin form https://github.com/quick2wire/quick2wire-gpio-admin
  2. Install relay-controller npm install relay-controller

USE

  1. relay.open(pin,[times],[callback])
    • open relay
    • times Time delay opening
    • callback will return status
  2. relay.close(pin,[times],[callback])
    • close relay
    • times Timing closure
    • callback
  3. relay.toggle(pin,[callback])
    • toggle relay open or close
    • callback will return relay status
  4. relay.openAt(pin,times,[callback])
  5. relay.closeAt(pin,times,[callback])
  6. relay.toggleAt(pin,object,[callback])
    • toggle relay open pr close timing
    • object {time:1000,number:10}
    • callback will return relay status

Explain

var relay = require("relay-controller").relay;
var pin = 21;

To open relay ...

relay.open(pin,function(status){
    console.log(status);
})

Timing close

relay.closeAt(pin,1000,function(){
    console.log("close...");
})

Or

relay.close(pin,1000,function(){
    console.log("close...");
})

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100