Introducing iZac, the Android Bartender

In a previous post, I alluded to a larger project I was working on in the physical/electronics/maker world, and now after much development, I'm pleased to present iZac, the Android Bartender!

A while ago I was inspired by Drink Making Unit 2.0 by Evil Mad Scientist Labs, and decided I wanted to build my own barbot. In this post I'll go over the high level details of what I did and why I did it.

One problem with any drink-dispensing machine is the difficulty of sourcing parts for interacting with food liquids. Pumps are expensive or impractical, valves are likewise problematic and difficult to obtain. My original intention was to use syringe pumps - effectively a DC motor hooked up to a threaded rod that pushes a syringe plunger in and out - and that was the reason behind my making the motor driver shield I wrote about previously. Unfortunately, syringe pumps turned out to be too fiddly and unreliable to use for the barbot, so I had to look for an alternate solution.

I ended up using a similar approach to that used by the DMU2.0, employing a battery powered aquarium pump to pressurize the ...

Migrating to Python 2.7, part 2: Webapp and templates

In part 1 of the migration series, we discussed changes to your app to take advantage of the 2.7 runtime's support for multithreading. Today, we'll start looking at the changes to the included libraries, and how we'll have to modify our app to use them.

webapp2

First up is the replacement of App Engine's lightweight webapp framework with webapp2. Webapp2 is an external open-source project, which says it "follows the simplicity of webapp, but improves it in some ways: it adds better URI routing and exception handling, a full featured response object and a more flexible dispatching mechanism". Webapp2 does an excellent job of maintaining compatibility with webapp, which is why it was chosen as a replacement, but it also adds a number of useful improvements on it.

To see what's changed in concrete terms, let's assume we have a very straightforward app that looks something like this:

import os

from google.appengine.ext import webapp
from google.appengine.ext.webapp import template

class BaseHandler(webapp.RequestHandler):
  def render_template(self, filename, **template_args):
	path = os.path.join(os.path.dirname(__file__), 'templates', filename)
	self.response.out.write(template.render(path, template_args))

class IndexHandler(BaseHandler ...

Grargh!

I had about half of this week's post - part 2 in the "migrating to Python 2.7" series - written when my browser ate it. I foolishly hadn't made a backup, and I lack both the time and the energy to rewrite it right now.

Sorry to all of you who were waiting, and you can expect to see it mid next week, after GDD.