#NEWLINE# def capture_timelapse( self , count , interval ) : #NEWLINE# #INDENT# 'Capture a time lapse.' #NEWLINE# filename = self . get_new_photo_filename ( '_{0:03d}_{1:03d}' ) #NEWLINE# with picamera . PiCamera ( ) as camera : #NEWLINE# #INDENT# camera . resolution = ( 1024 , 768 ) #NEWLINE# camera . hflip = True #NEWLINE# camera . vflip = True #NEWLINE# camera . start_preview ( ) #NEWLINE# time . sleep ( 2 ) #NEWLINE# for i in range ( count ) : #NEWLINE# #INDENT# camera . capture ( ( ( self . camid + '/' ) + filename . format ( i , count ) ) ) #NEWLINE# time . sleep ( interval ) #NEWLINE# #UNINDENT# #UNINDENT# return filename . format ( 0 , i )