No changes between revisions
/Designs/Spectrograph/SW/colores/python/setcol.py
File deleted
Property changes:
Deleted: svn:executable
-*
\ No newline at end of property
/Designs/Spectrograph/SW/colores/python/rts2-sensor-setcol.py
0,0 → 1,32
#!/usr/bin/python
#
# Initiating of COLORES
 
import sys
import serial
import time
 
#### Script Arguments ###############################################
 
if len(sys.argv) < 3 :
sys.stderr.write("Invalid number of arguments.\n")
sys.stderr.write("Usage: %s device command\n" % (sys.argv[0], ))
sys.exit(1)
 
print("setcol: initiating")
 
try:
ser = serial.Serial(sys.argv[1])
time.sleep(2)
command = sys.argv[2]
for c in command:
ser.write(c)
print("setcol: sending %s" % c)
time.sleep(2)
ser.close()
print("setcol: done")
sys.exit(0)
 
except IOError:
print("setcol: can not open device.")
sys.exit(1)
Property changes:
Added: svn:executable
+*
\ No newline at end of property