Incorrect reading from serial port #3012
Unanswered
julietafoglia
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
SerialPort Version
13.0.0
Node Version
v22.13.0
Platform
Windows 11
Architecture
x64
Context
Trying to read data server side in a web app (NextJS) from a Scale connected via USB (USB-to-serial port).
Read on XXX seconds intervals.
Code example
Results
Weight reading is not correct. For instance, for an object weighing 1.28 kg, it reads a combination of those numbers repeated several times with some 0 an Ls in between:
LLLLLL00000000888888L2222200001LLLL0L...
Additional information
Reading from Web serial API shows correct readings. For instance, for an object weighing 1.28 kg, it streams:
L00128L00128L00128L00128L ....
Using Hercules utility displays the same readings as Web serial API:
L00128L00128L00128L00128L ....
Beta Was this translation helpful? Give feedback.
All reactions