So you want to control a sentry gun using your head movement? L1Ranger has shared a guide to show you how to do just that. You can use a Recon Snow2 HUD installed in UVEX G.GL9 ski goggles to control your Nerf Vulcan sentry gun.
The developer wrote an Android program to use the magnetometer sensor for head tracking. The sentry gun is Arduino powered and WiFi connected. As you move your head, the gun moves to keep up. More info is available on Instructables.