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
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
		
# shelves:
# 	datacollect - sensor data collection - disabled to RAM
#	graphprep - building system graphs
#	housekeeping - fan check , general health and wellfare
# 	alarmchecks - checks for system health alarms 
#	actions - specific actions scheduled (i.e. camera picture)
 
from datetime import datetime, timedelta
import sys
import time



sys.path.append('./datacollect')
sys.path.append('./graphprep')
sys.path.append('./hardware')
sys.path.append('./housekeeping')
sys.path.append('./actions')
sys.path.append('./util')

import useCamera 
import hardwareactions



hardwareactions.openshutter()
#useCamera.takeSinglePicture("test", 1)
#time.sleep(5)
#useCamera.sweepShutter("test", 1)