Quote:
Originally Posted by michaelk
As I posted in your other thread in my follow up post I suspected the serial port was configured for a remote display which always outputs a reading. Since the serial port outputs continuous data there isn't an EOF or the like so it doesn't terminate. Do you know if serial port has other output modes?
Using cat or bash IMHO usually doesn't work very well with serial ports and using a programming language with serial port support is better.
|
It does have other modes, but when I set it to "stabilize" (as in, once the weight has stabilized, it sends a single weight to the serial port, but it never sends back the zero when the weight is removed from the scale, it will only send the next weight greater than zero which is not optimal for my use case).
I am thinking I may want to just run `cat` command for 5 seconds at a time, log that data to a txt file, and then have apache/php read the latest line. A bit jank, was hoping for something a bit more elegant.
I see in the manual for the scale it can be configured to send a "stop bit". Is that something that can send an End Of File? Manual here:
https://www.ohaus.ca/pdf/3000-Series-Indicators-Man.pdf (section 3.8 Print Menu)