I am working on a quadcopter (drone) emulator to learn flight controller programming.
I would like to connect a Dynam USB Flight Simulator four axis control to an Arduino UNO via the USB from the controller.
I gather one can connect a USB to TTL modules like PL2392, FT32RL, or CP2101 to TX and RX inputs and read data via Serial.available, Serial.read, etc.
It is not clear to me how to direct Serial commands to that device's USB port over the USB port to the PC.
I could not find much useful information via internet search. If someone could point me to useful information (code, etc) that would be appreciated.
You need to know what the command structure is , so you then know what to send and what the response back will be .
There maybe something on Drone forums about that .
It’s also worth a look at the Arduino serial tutorials t ok see how things work from the Arduino end
You can not do what you want to do on a UNO with only one hardware serial port.
You will need to use Software Serial for connection to the USB/TTL module.
Alternatively you can switch from the UNO to one of the many Arduino boards which have multiple hardware UARTS, often addressed as Serial (USB connection) and Serial1(TX,RX pins).
That will only work if the Dynam acts as a serial device.
Based on the connector in pictures of a Dynam (it has a USB-A connector), it needs to connect to a USB host; your Uno can't act as a USB host (you will need a shield for that).
I don’t have it in front of me, but there is a Python tool that can sniff USBHID so you could see the protocol, which I also would bet is fairly standard.
There is lots and lots of information about it at all sorts of level on line.
Note you will need additional hardware if you want to use a Uno, Mega or any other AT based processor.
On plugging the controller into a PC I got the "poop-da-loop" sound which was a good beginning.
Looking into the PC's Device Manager I see at Ports: "STMicroelectronic Virual COM Port (COM4)".
In properties:
Bit per second: 9600
Data bits: 8
Parity: None
Stop bits: 1
Flow control: None
In Advance Settings for COM4 [checked is]: "Use FIFO buffers(requires 16550 compatible UART).
In Driver: Driver Provider: ""STMicroelectronic'
I could get a USB Host Shield 2.0 and give a try? They are not very expensive.