error message: request for member '..' in 'var', which is of non-class type char

Hi there,

I am currently trying to read data from a serial port and in turn perform some simple operations on the data to test if it is the signal i expect, then store the value.

When trying to verify my project I get this error message from this line of code;

char inByte = RFIDPort.read();
if (inByte.length() >= 5){
RFID = inByte;
RFIDPort.end();

error: request for member 'length' in '(variable I am trying to read from serial port)', Which is of non-class type 'char' <-- the type I have declared the variable to be.

I am new to serial communication so I am wondering if I have done something fundamentally wrong.

Thanks in Advance

I am new to serial communication so I am wondering if I have done something fundamentally wrong.

Yes, you have. The error message is telling you exactly what is wrong. You are trying to call a method (length()) on something that is not an instance of a class.

You KNOW how long a character is. It is NOT 5 anythings long.