Exemplo n.º 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
Exemplo n.º 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
		
Exemplo n.º 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")
Exemplo n.º 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")
Exemplo n.º 5
0
def shutdownPi():
   # shut the shutter on camera
   hardwareactions.closeshutter();
   sys.stdout.flush()
   os.system("sudo shutdown -h now")
Exemplo n.º 6
0
def rebootPi():
   # shut the shutter on camera
   hardwareactions.closeshutter();
   sys.stdout.flush()
   os.system("sudo reboot")