Add rudimentary gyroscope checking.

Also add some #ifndef #define #endif stuff.