1379
Comment:
|
1684
|
Deletions are marked like this. | Additions are marked like this. |
Line 13: | Line 13: |
== Download == |
|
Line 14: | Line 16: |
== Help Screen == |
|
Line 37: | Line 41: |
The current baud rate list: | == Baud Rate List == |
Line 50: | Line 54: |
== Examples == 1. {{{./sterm.py -d /dev/ttyACM0 -b 6 -n -c filename.csv}}} * Uses port {{{/dev/ttyACM0}}} on Linux, set to 115200 baud, creates line numbers, and creates a CSV file of the data. 2. {{{./sterm.py -d /dev/ttyACM0 -n -c filename.csv}}} * |
Python Serial Terminal
This is a simple serial terminal program.
Features
- Generates a CSV file from the serial data. Serial data from the device must be formatted with commas between fields. The first row, after parsed, is taken to be the column length which all succeeding rows should equal.
- Add line numbers to the screen and CSV output.
- Set baud rate.
- Set serial device.
- Set output stream, default is current display terminal, but could be a file.
Download
Help Screen
$ ./sterm.py -h usage: sterm.py [-h] [-b BAUD] [-c CSVFILE] [-D] [-d DEVICE] [-l] [-n] [-s STREAM] Serial console optional arguments: -h, --help show this help message and exit -b BAUD, --baud BAUD Baud rate number, use -l to display available baud rates. -c CSVFILE, --csv CSVFILE CSV output filename -D, --debug Debug output -d DEVICE, --device DEVICE Serial device -l, --blist List available baud rates. -n, --line-numbers Prefix line numbers to each line. -s STREAM, --stream STREAM Raw stream filename
Baud Rate List
$ ./sterm.py -l 1 4800 2 9600 3 19200 4 38400 5 57600 6 115200 7 230400 8 250000
Examples
./sterm.py -d /dev/ttyACM0 -b 6 -n -c filename.csv
Uses port /dev/ttyACM0 on Linux, set to 115200 baud, creates line numbers, and creates a CSV file of the data.
./sterm.py -d /dev/ttyACM0 -n -c filename.csv