dwilches / Ardity

Assets for integrating Arduino and Unity (or Unity and any hardware that communicates over a COM port)
331 stars 62 forks source link

DtrEnable required for some devices #47

Closed dracolytch closed 3 years ago

dracolytch commented 3 years ago

Hey there,

Just playing around with your project, seems to work well! There was only one gotcha (which I found with other libraries, so it was no big deal to adjust for my use case).

For some devices, such as the AdaFruit Trinket M0 (And similar CircuitPython devices, I think)

Adding the line: serialPort.DtrEnable = true;

just before serialPort.Open();

in AbstractSerialThread fixed the issue. However, I'm sure others would want to set through a constructor or similar.

dwilches commented 3 years ago

Hello, Thank you for taking the time to report this. Some other users have also reported the same, so I just updated the readme with some information. Regards.

dustinkerstein commented 3 years ago

And for me, adding serialPort.RtsEnable = true broke communication. For my Arduino Nano, only DtrEnable was necessary.