So it’s a controller I have to program that moves a carriage & occasionally should also give me feedback info about the carriage position when given the appropriate command..
Just using bash it’s really simple, the controller takes commands easily with “echo” + “> dev” and then all I have to do is open a second terminal window and put it in input mode with the “< cat” command and when appropriate it will receive and display certain info. Like for instance if I type “echo Y > dev…” the “Y” command returns the position of the carriage cat terminal
And now I’m trying to make a gui user friendly program in python and I pretty much have the command part down. I’m just not sure how to simulate opening the second terminal and having it in cat mode so i can receive and store the position feedback information when appropriate
So far my code is using tkinter and subprocess. It uses the gui message boxes to have the user select the controller settings. Stores that info in appropriate variables. Then includes those variables in the bash script to program the controller as desired. And runs when the user clicks execute button. So far these initial settings & commands don’t actually return any output they just program the controller. I get stuck once I want to start using other commands that should return output. Displaying or storing the output in a text file is fine.
Roxystone is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.