Jun-20-2018, 06:08 PM
(This post was last modified: Jun-20-2018, 06:09 PM by satishgunjal.)
Code snippet as below. Please suggest where to make change?
try: initialize() while True: hourMinute = datetime.now().strftime('%H:%M') logger.info("Main()> hourMinute= " + hourMinute) humidityAndTemp(); if(iState == 'off'): startInletFan(hourMinute) else: stopInletFan(hourMinute) if(eState == 'off'): startExhaustFan(hourMinute) else: stopExhaustFan(hourMinute) if(vState == 'off'): startVentilationFan(hourMinute) else: stopVentilationFan(hourMinute) if(pState == 'off'): startPump(hourMinute) else: stopPump(hourMinute) time.sleep(30) # End program cleanly with keyboard except KeyboardInterrupt: print " Quit" # Reset GPIO settings GPIO.cleanup()