Skip to content

Commit d97749c

Browse files
authored
Merge pull request #47 from loisaidasam/master
Added `Usage docs` to README
2 parents e6ff058 + 5a61bb3 commit d97749c

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,19 @@ It will watch for new arp and udp requests on your network. There may be severa
4646
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
4747
as the first argument, such as `node bin/findbutton eth6`.
4848

49+
#### Usage docs:
50+
51+
``` js
52+
var dash_button = require('node-dash-button');
53+
var dash = dash_button(mac_addresses, iface, timeout, protocol);
54+
```
55+
56+
- `mac_addresses` string or array of strings
57+
- `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))
58+
- `timeout` timeout between presses in ms, default `5000` (5 seconds)
59+
- `protocol` either `arp`, `udp`, or `all`. default `arp`
60+
61+
4962
#### Example Usage:
5063

5164
**For a single dash**

0 commit comments

Comments
 (0)