Serial input without LF

I need input bytes from a sensor without a CR or LF. Something like
ByteAvail() and GetSerByte() on another microprocessor I have used.
As near as I can tell, all the Arduino Serial. subroutines require a full string with CR and LF.
mike

I don’t think the input from a sensor ever has a CR or LF, its just data. It is down to you to provide those codes as part of the formatting of the output to your peripherals.

The most obvious way is to use …println(data); which is effectively print+CR+LF.

mike6440:
As near as I can tell, all the Arduino Serial. subroutines require a full string with CR and LF.

Not sure where you've gotten that impression from.

To see if there are bytes pending in the input buffer, Serial.available() will return the number of bytes waiting. Use Serial.read() to retrieve the next byte in the queue. (returns a signed int value, so the special value of -1 can be return for a read when there is no byte waiting to be read. Otherwise the value will be in the range 0-255.) Serial.read() reads CR and LF characters just like any other, nothing special about them.