GPhoto2 Server – web interface for GPhoto2

There is an awesome UNIX/Linux utility called GPhoto2 (www.gphoto.org) that allows one to control DSLRs via USB. The amount of control is quite significant – one can make shots, download files and/or previews of photos, control aperture, exposure, ISO and many other settings that DSLRs expose (and even control focus servo, though with a bit of a hassle there).

The utility calls for a web interface – ever since I saw it I though how good would it be to control DSLR via WiFi from something like a Raspberry Pi (with battery) running GPhoto2. So I’ve started working a web interface for GPhoto2 – GPhoto2Server ( github.com/mvmn/gp2srv ), written in Java.

And now I’ve got first alpha version working. So I made a little video of it.

In order to get GPhoto2 on Raspberry Pi I’ve used this awesome project: github.com/gonzalo/gphoto2-updater.

And in order to make Raspberry Pi create own WiFi network I’ve used tutorial+distribs of hostapd from Adafruit: learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point/overview.

Advertisements

Drawing lots online

As a member of Toastmasters club I sometimes lead so-called Table-Topics in which I need to give participants tasks from a list of tasks – randomly, without repeats (unique task per participant).

I’ve used a free iPhone app in which I could configure the texts of tasks and which returned a random result on shaking phone. But I wasn’t satisfied with it. First of all it had a fixed amount of item slots so I had to leave blanks for non-used slots, and often got blank instead of a result. And I was getting results that were already used – repeats – so I had to shake more and more until I got valid result. The number of slots was big enough though, but still it was also theoretically possible to have a need for more tasks than the slots in the app. So 3 downsides in total.

So I spent several hours to quickly code my own solution – in HTML+JS+CSS, so I could use it on desktop and on mobile easily.

Here it is: http://mvmn.ho.ua/lot.html?items=one;;two;;three…

It’s all single file HTML+JS+CSS, no external libs are used, so it can be cached locally and used offline. All the data (list of items to choose from) is going into URL. This imposes a limit on total text length unfortunately, but for me that’s not a problem – hopefully won’t be a problem for you either. Otherwise storing data in URL only makes it very convenient – again, you can use it offline, and there’s no need for a server-side storage, which makes it all work faster.

I also tried to make UI touch-friendly, and tested it on my good old iPhone 4.

The source code is on GitHub: https://github.com/mvmn/lot

A couple of screenshots from iPhone: Continue reading