I’m pretty new to the BBB and I’m trying to automate the following process (in Windows 7):
- The user plugs a BBB into his computer via USB
- The user opens a GUI on his computer that allows them to set parameters for, let’s say cycling a GPIO pin on and off (on time, off time, number of cycles)
- He clicks an Execute button, which connects to the BBB via SSH and executes a python script with the parameters set in the GUI.
I have a script on the BBB that does what I need. I have a batch file that can establish an SSH connection through Putty and run a command file that executes the script that’s located on the BBB. I have a GUI that can execute a batch file. What I can’t quite figure out is how to make the variable parameters set in the GUI to modify the script that controls the BBB.
Here is my batch file:
start putty.exe email@example.com -m commands.txt
Here is my commands.txt file:
cd /home/debian/Desktop python GPIOPollingIO.py
I’m definitely not tied to this type of solution. In fact, if I could establish an SSH connection and keep it open, then execute commands on the fly instead of executing a prewritten script, I’d prefer the flexibility. This is just the best thing I was able to get in a few days of playing around with it.
Thanks in advance for any help.