Example #1
0
def  takeSinglePicture(source, delay):

	print("takeSinglePicture source:%s" % source)

	GPIO.setmode(GPIO.BOARD)
	time.sleep(delay)
	# blink GPIO LED when it's run
        GPIO.setup(22, GPIO.OUT)
        GPIO.output(22, False)
        time.sleep(0.5)
        GPIO.output(22, True)
        time.sleep(0.5)

	print GPIO.VERSION

	hardwareactions.openshutter()


	time.sleep(3.0)
	takePicture("Single Picture Taken With Shutter")

	hardwareactions.closeshutter()



	return
Example #2
0
def  takeSingleMovie(source, delay):

	print("takeSingleMovie source:%s" % source)

	GPIO.setmode(GPIO.BOARD)
	time.sleep(delay)
	# blink GPIO LED when it's run
        GPIO.setup(22, GPIO.OUT)
        GPIO.output(22, False)
        time.sleep(0.5)
        GPIO.output(22, True)
        time.sleep(0.5)

	print GPIO.VERSION

	hardwareactions.openshutter()


	time.sleep(3.0)
	takeMovie("Single Movie Taken With Shutter")

	hardwareactions.closeshutter()



	return
		
Example #3
0
def rebootPi(why):
   # Check for user imports
   try:
  	import conflocal as conf
   except ImportError:
  	import conf

   sendEmail("test", "ProjectCuracao Pi reboot\n" + why, "The Raspberry Pi is rebooting.", conf.notifyAddress,  conf.fromAddress, "");
   # shut the shutter on camera
   hardwareactions.closeshutter();
   sys.stdout.flush()
   os.system("sudo reboot")
Example #4
0
def rebootPi(why):
    # Check for user imports
    try:
        import conflocal as conf
    except ImportError:
        import conf

    sendEmail("test", "ProjectCuracao Pi reboot\n" + why,
              "The Raspberry Pi is rebooting.", conf.notifyAddress,
              conf.fromAddress, "")
    # shut the shutter on camera
    hardwareactions.closeshutter()
    sys.stdout.flush()
    os.system("sudo reboot")
def shutdownPi():
   # shut the shutter on camera
   hardwareactions.closeshutter();
   sys.stdout.flush()
   os.system("sudo shutdown -h now")
def rebootPi():
   # shut the shutter on camera
   hardwareactions.closeshutter();
   sys.stdout.flush()
   os.system("sudo reboot")