Timeline for Sending string over serial to nodejs app. Why does it get chunked?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 24, 2017 at 18:44 | vote | accept | jotadepicas | ||
Jul 22, 2017 at 17:47 | comment | added | Edgar Bonet | You are right. I was using an older version of the serialport module that doesn't work in the same way. Sorry for the confusion. | |
Jul 22, 2017 at 16:42 | history | edited | jotadepicas | CC BY-SA 3.0 |
syntax highlighting
|
Jul 22, 2017 at 16:40 | comment | added | jotadepicas |
@EdgarBonet I'm not sure about that, because according to npmjs.com/package/… you need to register for the 'data' event in the parser, not the port, so you need the reference to the parser to do a parser.on('data', yourFunction) . Recommended usage seems to be using pipe() .
|
|
Jul 22, 2017 at 12:05 | comment | added | Edgar Bonet |
You do not need to pipe() : you can new SerialPort('/dev/ttyACM0', { baudrate: 9600, parser: Readline("\r\n") }) .
|
|
Jul 22, 2017 at 4:27 | history | answered | jotadepicas | CC BY-SA 3.0 |