Online webcam project, part 2.

Trigger warning.

Stop! Don’t look at the following photographs if you are offended by ugly applicationsĀ of hot glue.

I found what I thought would be the ideal case for the camera and Pi in the kitchen. It was one of those Tesco plastic food boxes with clips and a watertight seal, and it had nasty cracks in the base in just the right spot to cut a hole for the lens. Using a variety of inappropriate tools, I made the necessary hole, and fixed the lens into it with hot glue.

Ugly hot glue!

As I warned you, very ugly hot glue. Note that it covers the join between the two parts of the lens, which I hope will ensure our good Welsh rain can’t get in between the lens elements. The next steps were to screw the inner lens cap in place, and mount the Raspberry Pi Zero inside the box. I was going to put it in the same part of the box as the lens and camera, but every arrangement I tried had the USB wireless antenna rather close to the camera and its cable. So, I mounted the Pi Zero in the lid of the box with a goodly lump of White Tac.

img_20160919_144721

A notch in the edge of the box, for the power cable, was the next thing. It’s at the bottom, and only a very small percentage of the rain around here falls upwards, so it may be OK without any sealant. I have more White Tac if there is a problem…

Software

Getting the camera to take a picture every ten minutes is not a problem, thanks to cron and the bash shell.

The intention is to use lftp to upload the pictures to the web host, but finding a decent example of code that will do that is not proving easy. Please feel free to comment if you have something suitable.

I shouldn’t have too much difficulty hacking out a web page for the picture to live in, as I am not planning anything fancy, so I’ll just use HTML, like the rest of my site.

Me, wearing a Panama hat, spectacles, and a fine growth of facial hair.

Author: Walrus

Just this guy, you know.