-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expecting 14 bytes, reader.read() not consistently reading 14 bytes. #124
Comments
From the lengths reported it appears that the device is always sending 14 bytes but that sometimes the data is chunked into different sized pieces. For example, 9 + 19 = 28 which is 14 * 2. This is expected behavior. The Promise returned by the Using CC @ricea, it looks like whatwg/streams#1003 already tracks adding an alternative to |
@kevindekemele: In addition to the suggestions already given, you might want to take a look at the |
Closing this issue. The answers above should resolve the reporter's issue and there has been no response. |
I have an arduino sending 14 bytes numerical data.
I manage to connect to the arduino, and to read. But, not everytime I get 14 bytes, sometimes less sometimes more.
This piece of code send a "0" every 50 ms. Then the arduino will send 14 bytes. I then print the array length, which should be 14:
Obsering the
console.log
:Reveals that about 90 % of the time, 14 bytes are received. How do I ensure consistend reads?
Thanks in advance.
The text was updated successfully, but these errors were encountered: