# Import modules from threading import Thread from datetime import datetime import time import os # Import the wrapped API import phidgetsClass_ext import laserClass_ext ####################################### # Create the lasers and phidgets objects ####################################### # Create the laser object laser0 = laserClass_ext.laserClass(0) laser1 = laserClass_ext.laserClass(1) # Create the phidget object phidgets = phidgetsClass_ext.phidgetsClass() #################### # INIT #################### # Init the stepper motor phidgets.initStepper() # Create a new main directory expDateTime = datetime.now().strftime('%Y-%m-%d %H:%M:%S') expPath = "data/" + expDateTime + "/"
# Import modules from threading import Thread from datetime import datetime import time import os # Import the wrapped API import phidgetsClass_ext import laserClass_ext ####################################### # Create the lasers and phidgets objects ####################################### # Create the laser object laser0 = laserClass_ext.laserClass(0) # Create the phidget object phidgets = phidgetsClass_ext.phidgetsClass() # Create a new main directory expDateTime = datetime.now().strftime('%Y-%m-%d %H:%M:%S') expPath = "data/" + expDateTime + "/" os.makedirs(expPath) #################### # 2 - Start laser #0 print "Start laser 0" # Setup the filename to save the current data laser0.set_fileName(expPath + "0_20.xyz") # Setup the parameters to save the data