typeofsensor is bytes

Of course, the type of sensor is not an Int but an array of bytes.