Skip to content

uutzinger/SerialUI

Repository files navigation

Graphical User Interface for Serial Communication

Serial Monitor SerialUI provides a graphical interface to send and receive text from the serial port, including a serial plotter for displaying numerical data. It offers features beyond the Arduino IDE Serial Plotter.

BLE Serial Monitor BLESerialUI is equivalent to SerialUI but uses the Nordic Serial UART on a BLE connection (Experimental, Unfinished Code)

The programs are written in python using pyQt.

Efficiency

Comparing Arduino IDE with SerialUI:

Text Display

Teensy 4.0 using the Test Program from Paul Stoffregen with default settings:

Arduino IDE is about 8 times faster in raw text display. This is likely due to Qt plainText widget. appendText would be the most efficient approach to display text but this method can not be used as it adds a newline after each insertion.

ESP32-S3 Adafruit Feather:

There is no difference between Arduino IDE and SerialUI.

Charting

With simple simulated data from Teensy 4.0 we can retrieve and plot about 2 channels with 80k samples/second/channel.

Arduino IDE plotter does not provide performance metrics.

Installation Requirements

One liner Windows: - pip3 install pyqt5 pyqtgraph numpy pyserial markdown wmi bleak qasync

One liner Linux: - pip3 install pyqt5 pyqtgraph numpy pyserial markdown pyudev bleak qasync

  • pyqt5 or pyqt6 user interface
  • pyqtgraph display
  • numpy data gathering and manipulation
  • pyserial serial interface
  • markdown help file
  • wmi on Windows for USB device notifications
  • pyudev on Linux for USB device notifications
  • qasync and bleak for bluetooth communication

In future version we will also need:

  • scipy image decompression
  • numba acceleration of numpy code
  • cobs serial data encoding (byte stuffing)
  • zlib and tamp for compression

Installation of PyQt5/6 has its own dependencies. If it fails, read the suggested solution in the error messages. For example pyOpenGL might be required.

The main programs are SerialUI.py and BLESerialUI.py. The use files in the assets and helper folders.

Description

Serial Monitor

Serial Plotter

How to Use This Program

Data Parsing

Indicating Data

Arduino Test Programs

In the Arduino_programs folder are example programs that simulate data for display.

Author

Urs Utzinger, 2022-2025 (University of Arizona)

Contributors

Cameron K Brooks, 2024 (Western University)