Command Line Interfaces
Included in the freewili python module are two command line interfaces to interact with a Free-Wili device without writing any code.
fwi-serial command line interface
Interact with a Free-Wili device over serial.
$ fwi-serial --help
usage: fwi-serial [-h] [-l] [-v] [-i INDEX] [-di DISPLAY_INDEX]
[-mi MAIN_INDEX] [-s SEND_FILE] [-fn FILE_NAME]
[-g GET_FILE GET_FILE] [-w [RUN_SCRIPT]] [-io [IO ...]]
[-led LED LED LED LED] [-gi GUI_IMAGE] [-gt GUI_TEXT] [-rb]
[-rd] [-ri RADIO_INDEX] [-rt RADIO_FILE] [--version]
options:
-h, --help show this help message and exit
-l, --list List all FreeWili connected to the computer.
-v, --verbose Verbose output
-i INDEX, --index INDEX
Select a specific FreeWili by index. The first
FreeWili is 1.
-di DISPLAY_INDEX, --display_index DISPLAY_INDEX
Select a specific FreeWili display processor by index.
The first FreeWili is 1.
-mi MAIN_INDEX, --main_index MAIN_INDEX
Select a specific FreeWili main processor by index.
The first FreeWili is 1.
-s SEND_FILE, --send_file SEND_FILE
send a file to the FreeWili. Argument should be in the
form of: <source_file>
-fn FILE_NAME, --file_name FILE_NAME
Set the name of the file in the FreeWili. Argument
should be in the form of: <file_name>
-g GET_FILE GET_FILE, --get_file GET_FILE GET_FILE
Get a file from the FreeWili. Argument should be in
the form of: <source_file> <target_name>
-w [RUN_SCRIPT], --run_script [RUN_SCRIPT]
Run a script on the FreeWili. If no argument is
provided, -fn will be used.
-io [IO ...], --io [IO ...]
Set IO. Argument should be in the form of: <io_pin>
<high/low/toggle/pwm> [pwm_freq] [pwm_duty]. No
arguments gets all IO values.
-led LED LED LED LED, --led LED LED LED LED
Set Board LEDs. Argument should be in the form of:
<LED #> <red 0-255> <green 0-255> <blue 0-255>
-gi GUI_IMAGE, --gui_image GUI_IMAGE
Show GUI Image. Argument should be in the form of:
<image path>
-gt GUI_TEXT, --gui_text GUI_TEXT
Show GUI Text. Argument should be in the form of:
<text>
-rb, --read_buttons Read buttons.
-rd, --reset_display Reset the display back to the main menu.
-ri RADIO_INDEX, --radio_index RADIO_INDEX
Select the radio. Typically 1 or 2.
-rt RADIO_FILE, --radio_file RADIO_FILE
Transmit subfile on selected radio. Name of the file
(ie. yellow.sub)
--version show program's version number and exit
fwi-convert command line interface
Used to convert image files to Free-Wili (fwi) files. This is useful for preparing images to be displayed on a Free-Wili device.
$ fwi-convert --help
usage: fwi-convert [-h] -i INPUT -o OUTPUT [--version]
options:
-h, --help show this help message and exit
-i INPUT, --input INPUT
Path to a JPG or PNG image to be converted
-o OUTPUT, --output OUTPUT
Output filename for the fwi file
--version show program's version number and exit