Skip to content

Commit

Permalink
Describe operating more than one usb relay module
Browse files Browse the repository at this point in the history
  • Loading branch information
darrylb123 committed Oct 8, 2014
1 parent d02ffd8 commit e0a0703
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ KERNEL=="hidraw*", ATTRS{busnum}=="1", ATTRS{idVendor}=="16c0", ATTRS{idProduct}
```
to `/etc/udev/rules.d/50-dct-tech-usb-relay-2.rules`.

Running the program will display each module that matches device 16c0:05df the debug information is sent to stderr while the state is sent to stdout for use in scripts.
Running the program will display each module that matches device 16c0:05df the debug information is sent to stderr while the state is sent to stdout for use in scripts. The only limit to the number of these relays that can be plugged in and operated at once is the number of USB ports.
```
$ sudo ./usbrelay
Device Found
Expand All @@ -129,11 +129,11 @@ $ eval $(sudo ./usbrelay 2>/dev/null)
$ echo $PSUIS_2
0
```
To set the relay state:
To set the relay state of 1 or more modules at once:
```
$ sudo ./usbrelay PSUIS_2=0
$ sudo ./usbrelay PSUIS_2=1 PSUIS_1=0
$ sudo ./usbrelay PSUIS_2=0 PSUIS_1=1
$ sudo ./usbrelay PSUIS_2=0 PSUIS_1=1 0U70M_1=0 0U70M_2=1
```
If for some reason the USB id changes, (ie other than 16c0:05df) set the USBID environment variable to the correct ID
```
Expand Down

0 comments on commit e0a0703

Please sign in to comment.