This repository contains both a command line serial logging program and a GUI program with the same functionalitly. The goal of this project is to enable viewing and logging of serial messages while experimenting with PyQt5 based GUI development. Plotting functions are designed to display gyroscope values read from an Arduino Nano 33 IoT.
Command line logger of serial data to file. This code relies heavily on pyserial by Chris Liechti. (https://github.com/pyserial/pyserial)
usage: cli_serial_logger.py [-h] [-f FILENAME] [-p PORT] [--baudrate BAUDRATE] [--bytesize BYTESIZE]
[--parity PARITY] [--stopbits STOPBITS] [--timeout TIMEOUT] [--xonxoff XONXOFF]
[--rtscts RTSCTS]
-h, --help show this help message and exit
-nl, --no_log Do not log data to file
-f FILENAME, --filename FILENAME ouput filename
-p PORT, --port PORT port name, default None. If None the user will be asked to select a port from a list.
--baudrate BAUDRATE int, default 9600
--bytesize BYTESIZE int, default = 8
--parity PARITY Enable parity checking. Possible values: *NONE, EVEN, ODD, MARK, SPACE
--stopbits STOPBITS Number of stop bits. Possible values: *1, 1.5, 2
--timeout TIMEOUT Set a read timeout value.
-x, --xonxoff Software flow control flag
-r, --rtscts Hardware (RTS/CTS) flow control flag.
PyQt5 based serial logger.
INCOMPLETE PyQt5 based live plotting of serial data INCOMPLETE
If an error on QtSerialPort occurs run:
sudo apt-get install python3-pyqt5.qtserialport