Add John's cleaned up mechatronic arm control code.