Skip to content

Commit

Permalink
Merge pull request #47 from loisaidasam/master
Browse files Browse the repository at this point in the history
Added `Usage docs` to README
  • Loading branch information
hortinstein authored Jan 24, 2017
2 parents e6ff058 + 5a61bb3 commit d97749c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,19 @@ It will watch for new arp and udp requests on your network. There may be severa
Note: If your computer has multiple active network interfaces, `findbutton` will use the first one listed. If you need to overwrite this setting, pass your preferred interface
as the first argument, such as `node bin/findbutton eth6`.

#### Usage docs:

``` js
var dash_button = require('node-dash-button');
var dash = dash_button(mac_addresses, iface, timeout, protocol);
```

- `mac_addresses` string or array of strings
- `iface` the name of the interface on which to capture packets. If passed an empty string, libpcap will try to pick a "default" interface, which is often just the first one in some list and not what you want. (from [the node_pcap README](https://github.com/mranney/node_pcap))
- `timeout` timeout between presses in ms, default `5000` (5 seconds)
- `protocol` either `arp`, `udp`, or `all`. default `arp`


#### Example Usage:

**For a single dash**
Expand Down

0 comments on commit d97749c

Please sign in to comment.