- Home /
Write to Serial port
The project am working on involves reading inputs from the serial port which I did using the System.IO.Ports. Now, I want Unity to write my Y-axis to an arduino chip. (I want to be able to detect hills on my terrain and use the information) How do I go about that, and can I use the same COM port that I'm already using to read?
Answer by DaveA · May 14, 2011 at 06:49 AM
Did you try searching for 'serial port' on this forum? In short, yes.
Ah, I forgot, my project actually reads and writes. Yes, I use the same port, just use .Write("whatever") for example. The $$anonymous$$SDN articles cover it. Careful though, $$anonymous$$ono 2.6.3, which Unity currently uses, has bugs with the serial port, and not all API's, even properties, are implemented. But simple ReadLine and Write, I can vouch for.
Your answer
Follow this Question
Related Questions
How to List Available Com Ports? 0 Answers
Long lag in serial communication with Arduino 4 Answers
Serial port Read problem (DataReceivedHandler) 2 Answers
Are serial (RS-232) events with Mono 2.6 supported? 0 Answers
Serial key before my game starts 1 Answer