Sending input to a device via Arduino Uno

I want to use a input device, let it be a racing wheel. But lets say that I only have the software driver for it not the physical device.
Is it possible to emulate that device, with an Arduino Uno R3 ?

Hello relativperspektiv

Yes,

as long as the interface requirements are known.

1 Like

Can you please elaborate on this. I'm not really a expert in input devices on windows 10

If this is an original Arduino (or faithful clone) with 16U2 TTL-to-USB converter, you need to, as a first step, modify the firmware of the 16U2 so it identifies itself as the racing wheel (based on USB VID and PID). Please note that modifying the firmware will prevent you from uploading code to the device and you need to use a programmer to program the 328P (main processor on Uno).

If you have a clone Uno with e.g. CH340 or FTDI chip you can stop now. A Leonardo / Micro might be a better choice in that case.

To understand what needs to be done, you have two options

  1. Reverse engineer the driver to understand the protocol / communication between PC and racing wheel.
  2. Buy the racing wheel. Next you can use a USB sniffer to analyse the protocol / communication.

Once you have figured the protocol out, you can write the Arduino code.

How your device is connecto the windows? Via USB?

Each interface must have at least the following characteristics:

Physical:
What voltages or currents are used to receive or transmit information?

Logical:
How is the information encoded using the above physical characteristics?

Yes, via the USB

Then you can't do it with Uno, choose another board.

I think that that is a bit "absolute". Program the 16U2 :smiley: (see my earlier reply).

@paulpaulson

Ok lets, say I somehow figured the interface out. What will be the next step, just straight up start coding ? or is there anything to look out for.

Keep it simple and stupid firstly.
Follow the example code that comes with the library or
run some tutorials for the hardware selected.
If you are happy with the results of the tutorials you can merge these to your project.

Problem is, that there is no example code or libraries (as far as I searched up) for the device I would like to emulate.
If you have come across any, it would be nice if you could link me to it.

You hardly have a chance to find example for your device.
But you can use examples from Keyboard and Mouse libraries.
In anyway it is a very long way to solution.

I think that a complete system development process will be necessary here.

I think that the idea of creating an emulator by a person who does not understand drivers is already a bit "absolute impossible" :slight_smile:

2 Likes

Shouldn't that be "You couldn't do it with an Uno".
Maybe OP has the Uno R4.

Another thing we have to ask every poster soon. Which Uno.
The same confusion as with the Nano.
Leo..

yep you are right, but its worth giving it a try right ?

That's my bad, I will edit my post now.

I have a R3 btw.

It doesn't matter, I think.
This whole thread is absolute theoretical.
So I quit

Thanks for the explanation @sterretje will look into it.