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?
get (): Promise <Flags>
Abstract Binding, it seems that the status can be known, so why not check it cyclically by timer processing etc.? – kunif