Python code for Pygame controller for BrickPi cannon