# Flight-Simulator-Arduino-Controller-HackRiddle-Fall-2016

Project for HackRiddle Fall 2016. Uses an Arduino's built in gyroscope to control the Google Earth flight simulator.

We came into HackRiddle not entirely sure what to do. As first time hackers with limited experience, we were exactly sure the extent of what we could accomplish. However, after looking through the hardware list, we thought it might be cool to develop an Arduino controlled flight simulator using the gyroscope built into the board. We understood it was an ambitious challenge, but we were ready to put our skills to the test.

What we ended up with is pretty close to our original idea. We programmed the Arduino to send gyroscopic information to the computer using a serial connection via a USB. This data is then captured by CoolTerm and transfered into a text file to be read by a C program. We tried to find a way to receive the data directly from the Arduino but ultimately were unsuccessful. The C program then took the data and used it to virtually press keys on the keyboard. Once in the flying mode for the Google Earth flight simulator, these keystrokes relayed the motion controls to the program using a custom keyboard layout for the program. This custom keyboard layout was created by altering the Google Earth config files.

The end result is something we are proud of. By tilting the Arduino board side to side and back and fourth, one is able to control the direction of the plane. We added a function using the accelerometer that allows a user to go faster by quickly pushing the Arduino forward and to slow down by pulling the Arduino quickly back. We were also able to add a pause function and a quit function to the space and escape buttons respectively. Features that we did not have the time to implement include a gyroscope reset key to prevent the gyroscope from drifting and better tracking with the gyroscope to make turns and adjustments more smooth and precise.

Built With

Share this project: