Generic python GUI - cu-ecen-aeld/buildroot-assignments-base GitHub Wiki
Generic python GUI
File name: https://github.com/cu-ecen-aeld/final-project-rajatchaple/blob/main/code/gui/gen_python_gui.py
This generic GUI is quite useful where display cannot be run or integrated with the embedded platform. The GUI has features to read sysfs driver data and display in intuitive form. This utility is developed keeping generic approach in mind as opposed to tightly bound application specific gui application developed using tkinter https://github.com/cu-ecen-aeld/final-project-rajatchaple/blob/main/code/gui/adc_gui.py
Application interacts with Beaglebone Black over serial using USB to TTL converter. Serial connections are as below. Blow diagram shows communication with MCP3002 chip.
The utility has been developed using pyqt platform and uses multithreading to schedule tasks. Utiliy also includes mechanism to select COM port and send/receive data over selected serial port.
This gui assumes that sysfs drivers are implemented. (However, dmesg logs can also be used to display reuired data over GUI with few changes) To use this application for I2C,
- Add I2C command inside init_continuous_write() similar to SPI0_CH0
- edit read_from_port() for the required data coversion
Note: This application has been tested on Windows 10.