Pebble Geekery and Broken Clouds

To check the current weather, just stick your head out of the window. Alternatively, you can try the following approach:

  • Cobble together a PHP script that pulls weather data from the Open Weather Map service and outputs the parsed values in the JSON format
  • Deploy the script on an VPS instance
  • Install and configure the My Data app on the Pebble smartwatch
  • Behold the solution in all its over-engineered glory
  • Re-write the script in Python using the Bottle framework
  • Try (and fail miserably) to impress your spouse with the accomplished feat

The source code (or rather code dump) for this project is available on GitHub.

P.S. The weather needs fixing, because the clouds are apparently broken.

Posted in Scribbles

What’s the point of film?

What's the point of film? - Japan Camera Hunter

Photography used to be so simple. If I felt like taking pictures, I’d load up my Contax 139 with slide film and off I’d go. No bag, just one prime, a polarising filter and maybe a spare roll of film. I didn’t think about it too much, it was just something I did occasionally and I’d sometimes go months without taking any pictures at all. But I always came back to the Contax in the end and was pleased when I did. It was a well-made, uncluttered little camera that did the job.

Continue reading What’s the point of film?.

Tagged with: ,
Posted in Photography

Keep Tabs on Your Stuff with the What’s in My Bag Web App

To learn the basics of the Python Bottle framework, I cobbled together a simple web app for tracking items in a bag. Aptly (and somewhat unimaginatively) named What’s in My Bag (or wimb), the app can be used to maintain a list of stuff in your bag. The app is designed primarily for photographers who usually have a lot of photographic paraphernalia in their bags.


The app is rather bare-bones, but it does the job. The only serious caveat is that it doesn’t offer any user access control mechanism, which means that you probably would want to run it on a local network only. I wrote wimb for my personal entertainment, but if you find it useful, feel free to deploy it on your own machine or server. Head to the project’s GitHub repository for the source code and installation instructions.

Tagged with: ,
Posted in Open Source, Scribbles, Software

The Olympic Venues of the USSR, 35 Years Later

The Olympic Venues of the USSR, 35 Years Later

The 1980 Summer Olympics in Moscow were controversial. While its war in Afghanistan had sparked a global boycott of the games, the USSR also wanted to showcase its capacity for opulence. To this day, the architecture of the Olympic Village lives on like an undying tribute to the Soviets’ misplaced and ultimately untimely ambition.

Continue reading The Olympic Venues of the USSR, 35 Years Later.

Posted in Photography

Raspberry Pi-Based Cable Shutter Release — Now with DIY Optocouplers

While a transistor-based cable shutter release does the job, it has one drawback. Grounding the camera to Raspberry Pi can cause the machine or the camera to have a negative ground. This might lead to a higher total voltage difference and could damage either of them. One way to solve this problem is to separate the camera and Raspberry Pi circuits using optocouplers (or opto-isolators).

While it’s possible to use a MOC3021 or a similar optocoupler for this, you can also build a simple DIY opto-isolator using a white LED and an LDR (light-dependent resistor). Basically, you need to align both components, so the LED’s light beam hits the surface of the LDR as shown in the photo below:

For better results, you might want to put heat-shrink tubing around the components to improve light transmission and prevent accidental light streaks (as well as make the DIY optocoupler assembly more sturdy). The LDR acts as a simple circuit switch: when the light hits the LDR, its resistance drops, thus closing the circuit. It might not be an optocoupler in the true sense of the word, but it serves well this particular purpose.


Replacing transistors with opto-isolators also simplifies the overall design, and you can use the diagram above to wire the circuits.

Tagged with: ,
Posted in Hardware, Photography, Scribbles

From Dusk till Dawn: A Night Photography Tutorial

Originally posted on The Daily Post:

By day Marcus Kazmierczak works as an engineer for Automattic on new product research; by night he heads out for photography. He writes about night photography at You can find more of his photography at

The sun going down doesn’t mean you have to put your camera away. Night photography offers up an opportunity to take unique photos — often with surprising results. With long exposures, the camera captures light and scenes in ways that our eyes can’t; this makes night photography fascinating to me.

This guide will help you get started with night photography, including a few tips and tricks I’ve picked up while shooting at night. So if night is the only time you have free for yourself and for your photography, you can still get out there.

Conservatory of Flowers, SF. f/8, 20min, Fuji 64T Conservatory of Flowers, SF. f/8, 20min, Fuji 64T

Getting started

Tip: I wear fingerless gloves, which allow…

View original 1,842 more words

Posted in Scribbles

Build a Raspberry Pi-Based Cable Shutter Release for Sony Cameras

Replacing a simple and inexpensive remote cable release for your camera with Raspberry Pi may seem like a classic case of over-engineering, but using the tiny machine to control the camera opens up a whole new world of photographic opportunities. Using a simple Python script, you can turn Raspberry Pi into a powerful and flexible intervalometer or trigger the shutter using sensors connected to the computer. Add to Raspberry Pi a Python-based web app, and you can control your camera from any computer or mobile device.

As with any DIY electronics project, there is always a risk of damaging your camera, so proceed with caution. If you are not sure what you are doing, don’t proceed at all.

This project provides brief instructions on how to build a Raspberry Pi-based cable shutter release and deploy a simple web app that can be used to control it. The setup uses a Sony NEX-3N camera, but any Sony camera compatible with the RM-VPR1 cable release should work fine. And with a few minor tweaks, you can adapt the setup to work with many other camera models.

  • RM-VPR1 remote cable release (you can buy a compatible unit cheaply on eBay)
  • 2x 1K resistors
  • 2x 2N2222 NPN transistors
  • A breadboard and handful of jump wires

First, disassemble the remote cable release. The release has three wires: focusing wire (yellow), trigger wire (red), and ground wire (white). The wire colors may vary depending on the unit you use. The way the cable release works is very simple: when it mechanically shorts (i.e., closes the circuit) the focusing and ground wires, the camera obtains focus. With the focusing and ground wires still shorted, the release then shorts the trigger and ground wires, which triggers the camera’s shutter.

To close the circuits in the required order electronically, you need to create a twin-transistor switch as shown below:


Use the following diagram to wire the circuits on the breadboard:


Next, boot Raspberry Pi and run the nano command to create a file and open it for editing. Paste the following code into the file:

#!/usr/bin/env python
from time import sleep
import RPi.GPIO as GPIO
GPIO.setup(23, GPIO.OUT)
GPIO.setup(25, GPIO.OUT)
GPIO.output(23, True)
GPIO.output(25, True)
GPIO.output(25, False)
GPIO.output(23, False)

Save the script and make it executable using the chmod +x command. Plug the cable release into the camera, turn it on, and run the script using the sudo ./ command. If everything works properly, the camera should fire.

To make it easier to control the cable release, you might want to add a simple Python-based web app. To do this, install the Python Bottle framework:

sudo apt-get update
sudo apt-get install python-pip
sudo pip install bottle

Instead of writing the web app from scratch, you can grab the code for this project from GitHub using the following command:

sudo git clone

Once you’ve done that, use the terminal to switch to the sony-rpi-remote directory, and run the sudo ./ command to launch the app.


Point then the browser to (replace with the actual IP address of Raspberry Pi), and you should see the web app in all its bare-bones beauty.

Tagged with:
Posted in Hardware, Photography

Enter your email address to subscribe to this blog and receive notifications of new posts by email.


Get every new post delivered to your Inbox.

Join 546 other followers