A Raspberry Pi time lapse camera and a two year old's first night in a big boy bed

Two years on from recording a time lapse video with a Raspberry Pi and Camera strapped to my new born son's Moses basket, now ready for his big boy bed, I repeated the exercise.

How a baby wriggles

The original video was compiled from a few hundred images taken at 10 second intervals. I largely followed instructions I had found for a Raspberry Pi powered surveillance camera. I was surprised by how many views this picked up as I don't really set about promoting my stuff. I mainly use YouTube as a personal video dump and as a quick way to share with family.

Blue Bunny and the big boy bed

The first video was made mainly for my own entertainment as a paternity leave project. However, when our son was ready to move from cot to big boy bed we really wanted a reliable way to keep an eye on him over the first few nights.

This time I used the Pi NoIR camera along with an infrared lamp to be able to see in the dark. For the software, I decided to keep it simple with a small Python script made with reference to the Picamera documentation. The camera took a photo every 10 seconds and dumped it in the root of the web server directory - either one of us could check the camera by visiting the IP address of the Pi.

import picamera
import time

camera = picamera.PiCamera()

while True:
    timeimage = time.strftime("%H-%M-%S--%d-%m-%Y")
    #An image to be saved with a time stamp for a file name.
    camera.capture(timeimage+ '.jpg')
    #The 'live' image
    camera.capture('now.jpg')        
    time.sleep(10)

A few bed time stories then we left him to it and after a few cheeky trips to turn his bedside lamp on, he settled himself to sleep. I ended up with nearly 4,000 images which I then made into a 33fps time lapse video using Movie Maker. At several points the camera began to slowly fall forward which in time lapse, had it not completely drooped at one point, almost looks like an artistic decision.

By and large he managed to stay in the bed and it was really sweet to see him chase Blue Bunny around in his sleep.

Could be interesting to repeat this every couple of years!