Control missile launcher from terminal#3
Conversation
|
Pretty sure audio won't work when you shoot a missile. 2 reasons:
|
|
True, I removed everything related to the sound. The idea was that you give the program one command, it executes it and the program quits. A friend of mine wanted it like this because he wants to be able to control the turret from his website by sending HTTP requests to a server which contains turret.py and other necessary files/installations. I don't have much experience of Python, so you can close this if you want, I don't mind! |
|
I actually did the same thing, but in a slightly different way. I keep the turret control program open and running on the server. My version of the program listens to STDIN for single characters corresponding to commands to move (W,A,S,D) or fire (F) the turret. I prefer it this way for a number of reasons:
Check out my repository if you'd like to see the code. |
New, simple file turret.py created for controlling the missile launcher from terminal. File takes two arguments: command (left, right, up, down or fire) and duration of the movement in milliseconds.