nick8967 wrote: ↑
Tue Jul 16, 2019 12:43 pm
For example: I start a program, this program gives me an output on the terminal, then I should give a command as far the output is concerned, the command is executed, the program gives me an output on the terminal, I should give another command, the program gives me another output, then I should give another command, etc until the program finally finishes. This whole procedure I want to take place automatically.
If you know what commands you want to run in what sequence in what situation you can simply put the commands in a shell script. That is you can write a program in script and have it do quite complex things.
Alternatively you can invoke commands from various programming language such as Python and make use of Python libraries and features to work out what commands to run when.
If you are thinking of having the RPi automatically working out for itself what commands to run that takes you into Artificial Intelligence and a different order of complexity.