A maior rede de estudos do Brasil

Grátis
LidarPythonCode

Pré-visualização | Página 7 de 7

oTriggerOLED.clear()
 procOLED = threading.Thread(target = fOperatingDisplayOLED)
 procOLED.daemon = True
 procOLED.start()
####
 ## PPS Thread
 oTrigger32K.clear()
 proc32KTrigger = threading.Thread(target = fHandlePPS_Triggers)
 proc32KTrigger.daemon = True
 proc32KTrigger.start()
####
 oOD.sMsg = "Start time %s" %( str(time.time()) )
 fSendAlertEmail()
# ## join blocks this function from completing
# ## press halt-switch for exit
 oMP.oMP_Start()
 # wait for stop
# GPIO.wait_for_edge(iHalt, GPIO.FALLING)
####
 except Exception as e:
 print("fDoTheThing() " + str(e))
 
 finally:
 bIsGPIO_CleanUp = True
 ## allow threads time to begin exit
 time.sleep(.05)
 #release threads to detect bIsGPIO_CleanUp = True or bResetTimePassed = False
 oAspectChange.set()
 oTriggerSerialSend.set()
 oTrigger32K.set()
 oTriggerOLED.set()
 time.sleep(.10)
 GPIO.remove_event_detect( iPinInt )
 GPIO.remove_event_detect( iUnoDataReady )
 GPIO.cleanup()
 ##
 serialPort.close()
 ##
 return;
oRT = cRuntime()
###################################################################################
# begin get string constants from eeprom 
###################################################################################
# get constants from EEPROM
oE_Read = cEEPROM_READ()
oE_Read.set_current_AT24C32_address( 0xC8 )
sConstants = oE_Read.fReadEEPROM( 0xC8, 0x13E )
oE_Read = None
sConstants = sConstants.split( "^" )
## print( sConstants[iZero] )
###################################################################################
# end getting constants from eeprom
###################################################################################
'''
0 = serial port
1 = cm
2 = VOLT
3 = AspectCng
4 = AspectComplete
6 = from
7 = to
9 = TH
'''
################# initialize serial port
serialPort = serial.Serial( sConstants[iZero], 115200, timeout = 1)
################# end initialize serial port
####
oPS = cProcessSerial()
oVin = cCalculateVoltage( 100600, 10000, 8.1, 5.0 )
oE = cEnvermentals()
oOD = cObjectDetection()
OLEDdevice = ssd1306()
####
fDoTheThing()

Crie agora seu perfil grátis para visualizar sem restrições.