Serial Flush Simulink Android

조회 수: 3 (최근 30일)
Alireza Ghaderi
Alireza Ghaderi 2020년 7월 25일
댓글: Alireza Ghaderi 2020년 8월 8일
Hi
Is there a way to Flush the incomming serial data in Simulink?
I am using Simulink Support Packages for Android and trying to receive serial data on android model...
Right now the problem is some times data comming is corrupted, so I want to Flush the stream of data...
If you have another alternate solution that would be great as well...
I am sending 5 unit16 (10 uint8) to android device...Right now some times it works some times no.. that because the data is becomming corrupted some times...

답변 (1개)

Sutanu Maiti
Sutanu Maiti 2020년 8월 6일
You may use the status port value of the Serial Receive block of Android. Use data only if status is 1.
  댓글 수: 1
Alireza Ghaderi
Alireza Ghaderi 2020년 8월 8일
I did this but still sometimes the transmission stops working... I think there should be a way to check start or end of the packet and start stroing from there...
Do you have an example in which a packet with multi data being set over serial to/from arrduino?

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by