An image of Heer de Beer

Heer de Beer.org

Exploring the Computational Medium

Monitoring my garden

Huub de Beer

2016

Timelapse of a growing vegetable garden
Garden in 2018

Introduction

Last autumn, I took apart my old wooden picnic table. This year I used it to create a slightly elevated 2×2 m² vegetable garden. To monitor its growth, I used the rest of the wood to create a crane that hangs over the garden. On that crane I installed a Raspberry Pi 3 computer and a webcam. Four times a day, at 9, 12, 15, and 18 o’clock, a picture of this garden is taken. As the wood I used for the crane was old and warped, the pictures taken are a bit out of whack. Furthermore, often they seem to be overexposed as well.

Vegetable garden and monitoring system

Nevertheless, it is interesting to see how the vegetable garden is doing over time.

The 2×2 m² garden elevated vegetable garden

I am growing the following vegetables in my vegetable garden:

They are grown in the square garden according to the following schema:

0 1 2 3 4 5 6 7 8
0 lettuce
1 carrots nut lettuce
2 beans
3
4
5
6
7 chives radishes
8

Rest of the garden

In the rest of the garden I grow:

And I’ve got a grassy patch I let naturalize to see what happens.

Setting up the monitoring system

Setting up the garden monitoring system was relatively easy. I use the following bash script (take_picture.sh) to take a picture:

#!/bin/bash
fswebcam -q -r 1920x1080 --no-banner ~/garden/`date +%F@%H:%M`.jpg

This script takes a picture and saves it with a name like 2016-05-28@15:00.jpg. By putting in my crontab,

0 9,12,15,18 * * * /home/pi/bin/take_picture.sh 

it is run automatically four times a day. Unfortunately, I found that the webcam driver would crash now and then, which meant I had to restart the computer to get it to take pictures again. As a quick fix, I added the following line to the root crontab:

35 8,11,14,17 * * *  /sbin/shutdown -r now

Now, after taking a picture and pushing it to my server, it will restart the computer to be ready to take the next picture. I push the photos taken to my server using rsync.