Office Cannon

Office Cannon

This project shows how to use the Office Cannon with the GoPiGo using a mouse. You can try out his example to see how the GoPiGo and the office cannon work and then you can let this warrior loose in your office wars.

Raspberry Pi Controlled Office Cannon

 Hardware needed:

Connecting the mouse and the Office cannon:

Connect the mouse and the office cannon to the USB port and power on the GoPiGo

Setting up the GoPiGo

Make sure that the GoPiGo is set up properly and you have the updated software and firmware. If you are not sure about this, follow the guide here.

If the GoPiGo is properly set up, connect to the GoPiGo via SSH or VNC and open terminal.

Running the example:

  1. Go to the Office cannon folder:
    cd Desktop/GoPiGo/Software/Python/Examples/Office Cannon/

    Open the office cannon example folder

  2. Start the office_cannon.py example
    sudo python office_cannon_v1.py

    Run the office cannon example

Controlling the Office cannon:

Use the following keys to control the Servo

  • Left Mouse button– Turn GoPiGo left
  • Right mouse button– Turn GoPiGo right
  • Both left and right mouse button– Stop GoPiGo
  • Middle mouse button– Fire rocket
  • Move mouse to control the launcher

Have a question? Go check out our support page here or post it on the forums here