Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (22 sloc) 794 Bytes
import logging
import datetime
from kalliope.core.NeuronModule import NeuronModule, MissingParameterException
from picamera import PiCamera
from time import sleep
logger = logging.getLogger("kalliope")
class Camera(NeuronModule):
Use the pi camera to take pictures
def __init__(self, **kwargs):
super(Camera, self).__init__(**kwargs)
# get the command
self.nb_photos = kwargs.get('number_of_picture', 1) = kwargs.get('directory', '/home/pi/')
self.timer = kwargs.get('timer', 1)
cam = PiCamera()
for i in range(self.nb_photos):
name = "pi_" + str( + ".jpg"
cam.capture( + name)
You can’t perform that action at this time.