Ejemplo n.º 1
0
#Either report parameters to the screen or change them
if len(sys.argv)<2:
  print(buf)
  sys.exit(0)


if len(sys.argv)<numAxes+1:
  sys.stderr.write("Must provide all axes\n")
  sys.exit(0)



#Build string to send
strToSend='vs'

for arg in sys.argv[1:4]:
  arg = int(arg)

  if arg<0:
    sys.stderr.write("Value out of range\n")
    sys.exit(0)

  strToSend += str(arg) + ','

strToSend=strToSend[:-1] + '$'


#Send string
ser.write(strToSend)
ser.close()
Ejemplo n.º 2
0
# Zeros the stage position of the OpenStage
#
# Purpose
# Zeros the position counters on the OpenStage LCD display. This also affects
# the stage position value read back on the serial port. Any locations bound
# To the right-hand buttons (triangle, square, etc) are retained, meaning that
# the stage will seek back to the original stored physical location.
#
#
# Rob Campbell - CSHL, December 2013

from OpenStageSerial import ser

ser.write("z")
ser.close()