02-14-2019 06:18 AM - edited 02-14-2019 06:19 AM
@tyar97 wrote:
I am trying to set the protocol but I am stuck.
Did you implement the protocol on the Arduino? You should have something similar to this:
byte sum = byte(val[0] >> 8) + byte(val[0]) + byte(val[1] >> 8) + byte(val[1]); Serial.write(0x2); //Send sync byte Serial.write(val[0] >> 8); Serial.write(val[0]); Serial.write(val[1] >> 8); Serial.write(val[1]); Serial.write(sum);
NOTE: I am not had the luxury of playing around with an Arduino, so fix any syntax errors I have introduced.
Then on the LabVIEW side, you do something similar to this:
Note: Notice that there are no waits in this VI. The rate of data coming into the port will determine the loop rate.
02-14-2019 09:28 AM
Yes, my code is very similar and works fine.
Finally, it seems it works perfect!!
Thank you very much and I really appreciate what you did!
02-14-2019 09:49 AM
Glad to hear you have it working!
0xDEAD