Please find example code lines below:
Please find a brief description of the usend command below:
usend - A tool for sending commands via USB to PengAlert devices
usend is an USB communication utility intended to send commands to a PengAlert device under
Linux and other alternative operating systems. Commands are human readable at the command
line but they are internally translated into binary codes prior to transmission.
usend [options]
usend [ -N number] -c command
OPTIONS
-V
Prints the version of usend and exits.
-c command
Sends the command to a device. If -N swich is not specified, the command is being sent only
to first discovered device.
-N number
Specifies additionally the device-number. Specified number shall be in range 1..254. A specified
number of 0 (zero) is rezerved for future extensions and specified number of 255 has the same
meaning as it would be no -N switch specified. When -N switch is specified the command is being
sent to all discovered devices and number is specified. Then it is responsibility of each individual
device to compare specified number with its internal device-number and execute the command on match.
The internal device-number could be changed by the command WRITENUMBER.
COMMANDS
#!/bin/sh
# init-sh - a test script
# This script is freely available for modification
# and/or distribution.
usend -c "PIEZO OFF"
usend -c "LED0 OFF"
usend -c "DIS0 OFF"
usend -c "DP0 OFF"
usend -c "EX0 HIZ"
usend -c "LED1 BLINK 0.5HZ"
usend -c "LED2 BLINK 1HZ"
usend -c "LED3 BLINK 2HZ"
usend -c "LED4 BLINK 4HZ"
usend -c "LED5 BLINK 0.5HZ"
usend -c "LED6 BLINK 1HZ"
usend -c "LED7 BLINK 2HZ"
usend -c "LED8 BLINK 4HZ"
usend -c "LED9 BLINK 2HZ"
usend -c "LED10 ON"