Skip to content

Commit

Permalink
Merge pull request #14 from d-sko/newoptions
Browse files Browse the repository at this point in the history
looks good!
  • Loading branch information
xkonni committed Feb 21, 2016
2 parents bb94dd0 + 869a9ba commit 7081c10
Show file tree
Hide file tree
Showing 2 changed files with 185 additions and 208 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@ https://github.com/Panzenbaby/Raspberry-Remote-for-Windows-10-IoT-Core

## Usage
Try if all is working with the send program
* Switch on single socket: `./send.cpp 00001 1 1`
* Switch on single socket: `./send 00001 1 1`
* Switch on multiple sockets: `./send 00001 1 00001 2 00001 3 1`

Pass the `-b`-option to use binary socket numbering instead of the common "only one switch up"-numbering. See [Binary Mode](#binary-mode) for further details.
### Options
* `-b`, `--binary`: Use binary socket numbering instead of the common "only one switch up"-numbering. See [Binary Mode](#binary-mode) for further details.
* `-p X`, `--pin=X` (X=pin number): Sets the pin number to use. Default is 0 in normal mode and 17 in [user mode](#user-mode).
* `-u`, `--user`: Run in user mode. This mode does not need root permissions, but the GPIO pin has to be exported beforehand using the `gpio` command. See [User Mode](#user-mode) for further details.
* `-s`, `--silent`: Disables all text output except for error messages.
* `-h`, `--help`: Display help.

## Binary Mode
Most sockets available for purchase use the following numbering scheme:
Expand All @@ -43,7 +49,7 @@ no. | address
C | 00100
D | 00010
E | 00001

Of course, this doesn't make much sense, because it limits the maximum of supported sockets to 5 (or 6, if 00000 is included), and is less intuitive. Using real binary numbering would increase the limit of supported sockets per system to 31, and be more intutive. In binary mode, the sockets need to be numbered as below:

no. | address
Expand All @@ -56,9 +62,13 @@ no. | address
8 | 01000
16 | 10000
31 | 11111

Note that you need to configure your sockets to this kind of numbering to use this feature. This often includes that the dedicated remote that gets shipped with the sockets often is rendered useless, since it only supports the former way of numbering.


## User Mode
Use this mode if you want to use `send` without root permission. The pin must be exported with the `gpio` utility beforehand because it will be used via the `/sys/class/gpio` interface. The command for the default pin is `gpio export 17 out`. The user must be a member of the *gpio* group to access exported gpio pins!.
**Important Note:** pin numbering is different in this mode! While wiringPi uses its own numbering scheme in default mode, this mode requires the native Broadcom GPIO numbers (the default port 0 is 17 in this mode). See the [wiringPi documentation](http://wiringpi.com/pins/) for further details.

## Daemon
Use the daemon in combination with the webinterface
* Copy the files in webinterface in your http directory
Expand Down
Loading

0 comments on commit 7081c10

Please sign in to comment.