Code for my Instructables account (http://www.instructables.com/member/nodcah).