0
votes

With NodeJS I would like to listen to changes on the CTS pin. The system is getting an external signal on the CTS pin. Most of the time the signal is on/high. I need to detect changes from low to high and high to low.

There is a package serialport and I've tried several settings in the options for creating a new SerialPort instance in node with the package (rtscts/xon/xoff to true/false). However, there is no 'listen' callback and I'm stuck how to do this? Searched the docs but can't find how to do this (if it is even possible).

Is it possible to detect changes on the CTS pin in NodeJS and if so how?

1
Since it is called get (): Promise <Flags> Abstract Binding, it seems that the status can be known, so why not check it cyclically by timer processing etc.?kunif
Thanks, didn't read the docs properly. That will do the trickPostie

1 Answers

0
votes

Answer provided by @Aritra Chakraborty and @kunif