Answer the question
In order to leave comments, you need to log in
How to deal with serial port in nodejs synchronously?
Good day everyone!
The task is to implement an exchange protocol over a serial channel.
Decided to use the node-serialport module ( https://github.com/voodootikigod/node-serialport).
Trouble: there are a lot of protocols, they have a synchronous interface (modules in C ++), you need to make this one synchronous too (get rid of callbacks).
Is it possible somehow in js to organize waiting for a response?
Desired example:
> var regs = bus.readRegister(100, 3);
[100, 101, 102]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question