Ejemplo n.º 1
0
    ledarr = SerialDevice(serialdevice)  # normally 0x07
except Exception as e:
    print(e)
    ledarr = False
    logger.debug("LEDARray is not connected!")

# connect to Motors
try:
    motors = SerialDevice(serialdevice)  # normally 0x08
except:
    motors = False
    logger.debug("Motors are not connected!")

# connect to Fluo
try:
    fluo = SerialDevice(serialdevice)
except:
    fluo = False
    logger.debug("Fluo module isnot connected!")

while (True):
    fluo.send("LENS1Z", int(zstart))
    time.sleep(0.1)
    for ix in range(xstart, xend, xstep):
        fluo.send("LENS1X", int(ix))
        time.sleep(0.1)

    for ix in range(xstart, xend, xstep):
        fluo.send("LENS1X", int(xend - ix + xstart))
        time.sleep(0.1)