seria.read - BYTE or INT ?!

it says (in the refs.) that the serial.read() function read 'one byte' (i.e., 8 bits) from the serial buffer, but it also says that it returns an 'int' type (i.e., 16bit). - which is it?

if i want to read an 8-bits at a time from the serial buffer, how should I declare my variables ?

It reads one byte (8 bits) from the serial port. But, if there is no data to read, it needs to return some non-valid value. So, the return type must allow for storing that non-valid value.

Since all values in the range 0 to 255 are valid, and all that a byte can hold, the return type must allow for some other value. -1 was chosen, so the return type needs to be an int.

If you only use Serial.read() after Serial.available() is used to assure that there is data to read, you can use byte as the type to store the returned value, or char. Which to use depends on the type of data being sent to the Arduino (ascii or numeric).

thanks!