I’d split it into two parts:
Rewrite your Arduino code to use a serial protocol
Write a gui to work with the serial protocol
—-
There are a lot of serial communication examples in the built-in examples and elsewhere. See
If you figure out a serial protocol, writing a gui that sends messages out on usb/serial has been solved thousands of times.