For a break-down of how I built this controller, check out the related blog post