0
\$\begingroup\$

I am sending a few data from Arduino Uno to Unity using serial Port, baud rate is 115200. Still Unity is response time is pretty poor.

At first it takes fraction of seconds to process, but as time goes response time increases a lot.

What can I do ?

Is there a better way to send data ? I have heard using byte[] will be very helpful. Can anyone please tell me how to send Vector from Arduino as byte & recieve in Unity, if actually possible.

As I said I will open-source the project. Take a look.

\$\endgroup\$
7
  • 1
    \$\begingroup\$ Welcome to GDSE. It would help if you could edit your question to include more information. For instance, how you are reading the data into Unity, how are you sending it, approximately how much data are you trying to move & what is your expected throughput rate? If there's too much code, you might need to make an Minimal, Complete, and Verifiable example. \$\endgroup\$
    – Pikalek
    Apr 1, 2019 at 18:25
  • \$\begingroup\$ There was just three variables, I was sending them with a : separation . But that was slowing down, so I slowed down Arduino & used Quaternion.Lerp in Unity, pretty smooth. \$\endgroup\$ Apr 2, 2019 at 10:08
  • \$\begingroup\$ That's a bit more information, but it's still not enough for someone else to replicate the problem, which in turn makes it difficult to offer meaningful solutions. For instance, different variables have different implications for data transfer (i.e. a single int versus a 20MB int[]). It seems that you've found a solution - please consider editing both to provide enough information to make them useful to others. \$\endgroup\$
    – Pikalek
    Apr 2, 2019 at 13:55
  • \$\begingroup\$ @Pikalek I am doing a varsity project, after submitting , I will surely open-source the whole project .. Then I will provide a link... Btw, you guys can wish me luck.. :p \$\endgroup\$ Apr 2, 2019 at 14:28
  • \$\begingroup\$ Links are nice & it's great that you want to open source your project. However within the Stack Exchange model, good questions & good answers need to be self contained enough to be useful to others. \$\endgroup\$
    – Pikalek
    Apr 2, 2019 at 14:52

1 Answer 1

0
\$\begingroup\$

I have changed the dalay in Arduino. Then used Quaternion.Lerp in Unity, works pretty well & smooth for me.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .