I have 2 tasks that are executed separately and each has its own python file.
One task is to monitor the gpio. What it does is count how many times a button is pressed. I have to run this forever and used linux command nohup to run this in background.
I have another python file that simply displays a menu. Like below.
1. Display button press count.
2. Reset button press counter.
I'm just starting to learn python. So my question now is how can I make this into one file or 1 single task if possible. Simply put, how can I display the menu and do the monitoring at the same time.
Pardon me if this is terribly the wrong way of doing things. I'm open to any suggestions.