This site is being deprecated.
Please see the official X‑Plane Support page for help.
It can be done... if you know how to code it. If not you can make it with pieces of software done by others and try to use for your convenience. https://github.com/opentrack/opentrack/ for example this software can take input from a gyroscope (it can be from a cellphone via udp or from headtrackers done with arduino..) and create a virtual joystick with those inputs.Remember that gyroscopes have precession and normally use some magnetometer to sync it.
But I don't understand your idea, using a gyroscope as joystick inputs might be erratic and simply doesn't make sence. Would you explain why you think you need it this way?
This site is no longer being actively maintained.