Theater ValveControl Firmware Interface¶
The motion control server uses the following module to communicate with the Arduino valve controllers running the ValveControl Arduino Sketch over USB serial.
stage.valves¶
valves.py : sample code in Python to communicate with an Arduino running ValveControl
No copyright, 2021-2024, Garth Zeglin. This file is explicitly placed in the public domain.
- class stage.valves.ValveControlClient(port=None, verbose=False, debug=False, **kwargs)[source]¶
- Class to manage a connection to a serial-connected Arduino running the ValveControl script. - Parameters:
- port – the name of the serial port device 
- debug – true when debug log is enabled 
- verbose – flag to increase logging output 
- kwargs – collect any unused keyword arguments 
 
 - close()[source]¶
- Shut down the serial connection to the Arduino, after which this object may no longer be used.