I've made a few little games using PyGame and I recently made a networked stock system server and client software, so I thought I
could make a controller that could control a game over my local network. I did plan on making a rifle but due to what materials I had at the
time I'd start with a hand gun.
I first cut out 2 hand gun like shapes from a sheet of 5mm clear acrylic keeping it wide enough for the Raspberry Pi Zero W etc. I attached them together using some masking tape and positioned the Pi Zero, charge circuit, LiPo battery and a MPU6050 board (3 axis Gyroscope & 3 axis Accelerometer).
I marked on the masking tape their positions and the mounting holes, wiring feed through holes, and as the LiPo battery was going to be inside the handle so I marked the corners of the rectangle shape. I drilled out the holes and corners of the LiPo with a bigger holes so I jigsaw the straight edges. I used some sandpaper to tidy up the acrylic edges and then sprayed with matt black paint the 2 facing sides of the acrylic. When dry I put the 2 black sides together and fitted the PCB's and started on the wiring between the PCB's.
I used 2 recycled 2 colour (red and blue) LED's to show which controller your using, connected to the server game and blink once when shooting. It would of been easier to fit the LED's having the Pi Zero not on the gun but I managed all the same.
Mouse over the pictures below for more information