- Home /
Help with serial communication with a arduino? Getting lag with mode code
Greetings,
Any good examples of how to read and write to a serial port with out getting lag.
I have basic code that works in a non asset heavy scene, but my main application uses a ms kinetic v1 and oculus rift dk1. I'm using the wireless arduino to send accurate information about the orientation of hand, that the arduino is attached to. Also, if a arduino button is pressed.
My arduino sends 4 pieces of information per line, delineated by a comma.
In low asset scenes, the button manipulates the scene in real time. On the complex scene, it starts out responsive, but within a few seconds it starts to lag and fall behind until the data is no longer useful and is very delayed.
My code reads the serial pore for a full line, each frame. But, I'm getting the impression that perhaps the serial buffer is getting full and unity is not removing the values fast enough.
Any code or links would be appreciated. Would post my code but I am at emergency room with my son..yay!
I was considering trying a coroutine, but I know nothing about those, and read that passing values out is not too straightforward.
I've done a bunch of googling, and yet to find a solution hours later. So. I really appreciate any info!
Your answer
Follow this Question
Related Questions
cant register 1 Answer
No serial number - Unity Personal - needed for CLI integration 0 Answers
Arduino with Unity: Bad Framerate! 3 Answers
how do i see my serial number. it's not there in my email 1 Answer
Multiple Serial Number Activation 1 Answer