Exemplo n.º 1
0
 def UpdateDispatcher(self):
     reactor.callWhenRunning(self.SQLInterrupts)
     if self._isRunning == True:
         #reactor.callWhenRunning(self.UpdateVars)
         self.Pressure = GP.getPressure()
         reactor.callWhenRunning(self.dataRecorder.UpdateDatapoint, self.LeadAvg, self.Pressure)
         sys.stdout.flush()
         sys.stdout.write("\rTemperature: %.02f | PID: %.01f | Pressure: %.01f" % (self.LeadAvg, self.PIDVal, self.Pressure))
Exemplo n.º 2
0
 def UpdateDispatcher(self):
     reactor.callWhenRunning(self.SQLInterrupts)
     if self._isRunning == True:
         #reactor.callWhenRunning(self.UpdateVars)
         self.Pressure = GP.getPressure()
         reactor.callWhenRunning(self.dataRecorder.UpdateDatapoint,
                                 self.LeadAvg, self.Pressure)
         sys.stdout.flush()
         sys.stdout.write(
             "\rTemperature: %.02f | PID: %.01f | Pressure: %.01f" %
             (self.LeadAvg, self.PIDVal, self.Pressure))
Exemplo n.º 3
0
def ControlArduino(TempDataInStream, DaemonRunFlag, PressureVoltage):
    while True:
        #get some data now!
        temperature_celcius = float(GP.getTemperature())

        #put this to the queue
        TempDataInStream.put(temperature_celcius)

        #get the pressure transducer data and put that on memory
        PressureVoltage.value = float(GP.getPressure())

        #This routine checks if the stop flag is raised, and puts it in
        #variable "runflag" to stop the loop
        if DaemonRunFlag.qsize() != 0:
            if DaemonRunFlag.get(timeout=1) == True:
                RunFlag = False

        time.sleep(1)
Exemplo n.º 4
0
def ControlArduino(TempDataInStream, DaemonRunFlag, PressureVoltage):
    while True:
        #get some data now!
        temperature_celcius = float(GP.getTemperature())
        
        #put this to the queue
        TempDataInStream.put(temperature_celcius)
        
        #get the pressure transducer data and put that on memory
        PressureVoltage.value = float(GP.getPressure())
        
        
        
        #This routine checks if the stop flag is raised, and puts it in
        #variable "runflag" to stop the loop
        if DaemonRunFlag.qsize() != 0:
            if DaemonRunFlag.get(timeout=1) == True:
                RunFlag = False
                
        time.sleep(1)    
Exemplo n.º 5
0
#!/usr/bin/env python

import GeyserProto as GP
import time

while True:
    print GP.getPressure()
    time.sleep(1)
Exemplo n.º 6
0
#!/usr/bin/env python


import GeyserProto as GP
import time

while True:   
    print GP.getPressure()
    time.sleep(1)