A Trip Outside

Now that the camera was up and running I needed to think about how to set it up outside. FreeCAD was difficult to use at first but as I gain experience I find myself enjoying the process a lot more. Be sure to save often! Here are all the parts needed.

I should have taken a better picture… You can see how warped PLA prints can get. With careful planning it’s still possible to make useful parts.

Another blurry picture showing how flexible this setup is. There is room for improvement, my designs tend to be bulky and waste plastic. The part that anchors the camera on trees is way too thick. At least it’s only 10% infill so not too much waste here. 

The plan was to make the camera waterproof before bringing it outside but I quickly realised that this goal would take a while! In the meantime the cameras are only used during fair weather. I put a rubber band around the the case, hopefully it will protect the camera in case of surprise showers. Spring weather can be a bit unpredictable.

On the software side now. In the first post of this project I complained that the Trinket won’t work with Linux but that’s not quite true. My first try was with the old 2006 MacBook running 32-bit Ubuntu. When that failed I assumed that Linux was a no-go and dropped the idea. That was a stupid assumption! A couple of days later out of curiosity I plugged the board in my 64-bit machine and it worked! No need to boot up Windows anymore!

I made another dummy mistake, this time in the code. The interval between pictures is set using the delay() function which takes an unsigned long as its parameter. Now that I’m a Python convert I haven’t declared variables for years. Without thinking too much I declared the interval variable as an int. I couldn’t understand why the camera would freeze with delays of more than 32 seconds ( 32,767 milliseconds to be exact, that was the hint about the int). I even contacted Adafruit support for this… oops, please ignore.

Time to take Pazu’s eye outside.

In the last post I forgot to mention how movies are made from images. I use ffmpeg. This is a trick I learned while making procedural animations with Python. Get ffmpeg and then open a terminal and try this:

Some options are not needed, some I don’t understand. I mostly just copied from stuff I found online.

In this example the frame rate is 12 and the video starts with the file PIC000.jpg.  Sometimes I want to skip the first couple images let’s say up to PIC015.jpg so then I’d use “-start_number 15”.

Pazu’s first time in the garden.

The camera had around 5 hours max before it ran out of power depending on how often it took snapshots. Next step is to reduce power consumption.

Previous: Making a robot eye

Leave a Reply

Your email address will not be published. Required fields are marked *