This Python application provides a real-time graphical user interface for visualizing RC (Radio Control) channel data that has been preprocessed by an STM32 microcontroller. It reads serial output from the MCU, which parses CRSF (Crossfire) data and sends it over UART, and displays the values of 16 channels using progress bars and numerical labels.
- Real-time visualization of 16 RC channels
- Progress bars for visual representation of channel values
- Numerical display of exact channel values
- Multi-threaded design for efficient data processing and GUI updates
- Serial port communication for data input from STM32 MCU
- Python 3.x
- tkinter
- pyserial
-
Clone this repository:
git clone https://github.com/TonyInvent/rc-channel-visualizer.git
-
Install the required packages:
pip install pyserial
-
Ensure your STM32 MCU is set up to parse CRSF data and output it via UART in the following format:
printf("channel_values data:\r\n"); for (int i = 0; i < CRSF_NUM_CHANNELS; i++) { printf("Channel %d: %d\r\n", i, channel_values[i]); } printf("\r\n");
-
Connect the UART output of your STM32 MCU to your computer's COM port.
-
Update the COM port in the code if necessary:
self.uart = serial.Serial('COM5', 468000, timeout=1)
-
Run the script:
python channel_viz.py
-
The GUI will open, displaying real-time data from your STM32 MCU.
- The STM32 MCU parses CRSF data and sends it over UART.
- The Python application initializes a serial connection to the specified COM port.
- It starts two threads:
- One for reading serial data from the MCU
- Another for processing the received data
- The main thread updates the GUI with the processed data.
- Channel values are displayed both as progress bars and numerical values.
Contributions, issues, and feature requests are welcome. Feel free to check issues page if you want to contribute.