Hello again,
No, those aren’t Linux commands, those are arguments needed as input to run the code.
You simply need to open the command prompt, cd to where you have the code and run
python usbrly08.py -p /dev/tty.usbmodem00030611 -g -a off
But that’s an example, here’s more info on that:
Setup tool’s command line arguments
ap = argparse.ArgumentParser(description="USB-RLY controlling tool version %s" % (__version__))
ap.add_argument('-p', '--port', help='Serial port of the USB-RLY device', required=True)
ap.add_argument('-t', '--timeout', metavar='SECONDS',
type=int, help='Timeout for serial communications')
controlGroup = ap.add_argument_group('control')
controlGroup.add_argument('-a', '--all-relays',
help='Set all relays to specified state', choices=['on', 'off'])
controlGroup.add_argument('-n', '--relay-on', help='Set a relay to ON state',
type=int, choices=range(0, 8), action='append')
controlGroup.add_argument('-f', '--relay-off', help='Set a relay to OFF state',
type=int, choices=range(0, 8), action='append')
controlGroup.add_argument('-r', '--set-relays', help='Set the state of relays by 8-bit value (0-255, 0x00-0xff)',
metavar='value', action=Uint8ValueAction)
queryGroup = ap.add_argument_group('query')
queryGroup.add_argument('-g', '--relays', help='Get the state of the relays', action='store_true')
queryGroup.add_argument('-s', '--get-serial',
help='Get serial number of the board', action='store_true')
queryGroup.add_argument('-i', '--get-version',
help='Get SW version of the board', action='store_true')
Anyway, good luck with the other relays and your project!