The following Python scripts use OptoMMP thru the socket interface to communicate groov EPIC:
"mmpgetuptime" returns the uptime (ms) of the controller: one optional parameter for host.
python mmpgetuptime.pywill default to localhost.python mmpgetuptime.py <hostname or IP address>will get the given host's uptime.
"mmpreaddigmodch" returns the state of the given module and channel: two required parameters for module and channel number.
python mmpreaddigmodch.py 0 1will read the digital state of localhost module 0, channel 1, and output the result.
"mmpwritedigmodch0or1" sets the state of the given module and channel: three required parameters for module number, channel number, and state 1 or 0
python mmpwritedigmodch0or1.py 0 1 1will write the digital state of localhost module 0, channel 1 to be = 1 (on/true) and attempt confirmation.
"pulseprogram" Flashes output 22 on module 0 twenty two times. Source code is pulseprogram.cpp, uses the OptoMMP C++ SDK.
sudo chmod +x pulseprogramto make the file executable,./pulseprogramto run the program.
The following Python Scripts use the Manage RESTful API thru the requests package to communicate with groov EPIC:
"restreaddigmodch" returns the state of the given module and channel: two required parameters for module and channel number.
python restreaddigmodch.py 0 1will read the digital state of localhost module 0, channel 1, and output the result.
"restwritedigmodch0or1" sets the state of the given module and channel: three required parameters for module number, channel number, and state 1 or 0
python restwritedigmodch0or1.py 0 1 1will write the digital state of localhost module 0, channel 1 to be = 1 (on/true) and attempt confirmation.
sudo apt-get updatesudo apt-get install python-pippip install requests