Then - work on combining your codebases and the libraries together this might be the most difficult part of the project, or it might be the simplest. Make sure they are working ok, and fix anything you find at this stage. Once you have something on both sides working in a test mode, then try each out with the game. Save a copy of your joystick code, then reload the arduino with your keyboard code, taking other inputs/buttons and mapping them to keypresses again - don't use the game, instead open up notepad or something and have the output appear there. Once you have the number of controls needed (analog inputs from potentiometers, and button inputs) for the joystick side of things working and verified, go to the keyboard side. I would concentrate on getting one side, then the other operating independently for instance, start with the UnoJoy library, and try to get it to take the input of a potentiometer, and have it output to the PC, looking like a HID joystick - and use some kind of testing program on the PC to see how it is working (don't try to use the game in the beginning).
Bow arduino simulator code#
It might turn out ok - or you might find yourself needing to wade through both library's code bases, and coming up with something custom. The trick will be to combine both the keyboard and unojoy (or whatever other joystick emulator library) you use together. You should review those examples carefully. It appears from the sample code of UnoJoy, that it already supports analog sticks, in addition to the digital buttons. So, you would need to emulate -both- of those.
The "ship driver" appears to the PC as a couple (or more) USB HID devices - at minimum, a joystick/pad and a keyboard.
Bow arduino simulator how to#
(And how to build those azimuth throttles, but that's another question.) With a little bit of Googling it seems like the UnoJoy is a good way to present the controller to the PC, I'm just not sure how to "talk" to the game. For example, how to tell it that the value coming from this potentiometer should should set the right engine throttle. I only have experience building the projects in the Arduino starter kit, so I know I have a lot to learn, but the big thing that seems like a mystery to me is how you would interface with the game.
It would also ideally communicate to the PC via bluetooth, since I play on the TV while sitting on the sofa.
At one point a device called the ShipDriver was produced, but it has been discontinued, doesn't do exactly what i want, and it's more fun to build than to buy.Ī controller that should fit on your lap with things like two azimuth thrusters, rudder wheel, side engine thruster throttles, etc. I started playing Ship Simulator Extremes, and I got to thinking about what it would take to make a custom controller for it.