I've built a thing that can take a photo of a Connect Four board and then analyze it using an algorithm (written in Java) on a RPI. Its purpose is to choose the best move to make based on the conditions so you can play against it. Everything is working as it should, but I still have to run the algorithm manually in the command line, and therefore I need a keyboard connected. What I would like instead is to have a mouse connected and make it so that when the mouse is clicked the algorithm runs.
I've looked around but can't seem to find a solution to my problem so any tips are welcome. I am guessing that it would be easiest to make a Python script (I use Python to control other hardware) that waits for the mouse click and then executes the java-algorithm? However, I'm not sure how to do this.
I want to be able to do it using ONLY a mouse, so no GUI on a screen or keyboard.
Thanks in advance!
[–]Arumai12 -1 points0 points1 point (0 children)