V
V
Vitaly Chura2017-03-07 10:46:25
Do it yourself
Vitaly Chura, 2017-03-07 10:46:25

How to transfer data from/to game to microcontroller?

Good afternoon.
Can you tell me how to organize the input-output of information from a computer game to a microcontroller?
Let's say there is a certain flight simulator, I would like to try to assemble the dashboard.
What can you read to figure out how to organize it?
Thanks in advance to all who answer.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Stepanov, 2017-03-07
@koronabora

Use MK with usb connection and com port. We connect the board, we get a com port in the system. Further, the simplest thing is for MK to send the status of the sensors to the com port once every 10 ms, or as quickly as it can (it will still be reading data from the ADC). And the program on the computer itself will parse the data, smooth the values ​​and make changes to the game on the computer.
When using Arduino, for example, you need to understand that it has a 10-bit ADC and all possible values ​​\u200b\u200bcan be from 0 to 1023. Also, you need to take into account that there is a lot of interference and you always need to filter data from the ADC with at least a moving average or more advanced filters ( since the filters will cut off the "flickering", in which the frequency is higher than that of the useful signal). And filtering is a delay. And for input, a delay of more than 100ms is already fatal.
Also, a separate task is how to correctly connect a steering wheel to the ADC, for example (this is done simply using a high quality variable resistor) or buttons (using limit switches or piezo switches). Just connecting is easy, but how to make sure that pickups do not affect, and also so that readings do not go astray over time, is a big science.

E
evgeniy_lm, 2017-03-07
@evgeniy_lm

There are two options
1. Use the game's API, if
available 2. Tweak the game's memory, write a driver with direct access to the required memory. The task is not trivial, you can try to use ArtMoney to find the necessary parameters, but not a fact, but not a fact what happens

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question