for a long time I was more one of those silent readers, but now I might need some help, because the internet research wasn't that helpful.
I'm working on a desk companion for university research, which is able to track sitting time via face recognition.
That's the part of the program which works perfect.
My current output is terminal based and I'm able to get sitting time, break time and so on.
Also the current "robot" communicates via terminal if he's happy/neutral/sad and so on; depending on the time the person is sitting. Also I get a logfile, which contains break time duration and so on. Overall the robot has seven states, which I can view via terminal.
If the person makes a break, the robot also gets more happy. So the state is always changing.
So far so good; - but that's not enough for my purpose, so I'm working on a GUI for the robot.
The GUI should (atleast) display a robot face (with different emotions) and a health bar.
I choose tkinter for my GUI and I'm able to do basic stuff. I also made the images and know how to display my images in general.
There is always the problem: If I try to run my whole program which contains both parts, it really doesn't work.
My main script contains the logic about the robot state and it's also really important for the logfiles.
So my question is: How can I make a picture based GUI which updates at the same time as the main script.
And what is the best solution? Should I use the after-method, threading or trying to work without a mainloop (Tkinter).
Also; - If someone has maybe some small examples or even a much better solution/suggestion, I would really appreciate it. Tkinter is new for me; - so maybe it's simple to do and I just don't get it.
Note: I don't want that some of you do my work for me; - I just simply want to collect some suggestions what would/could work best for my purpose.
General info: I'm using a RasPi3b+, a camera module (obviously) and the official RasPi-display for this project.