myValue declaration

The value assigned to "myValue" is not a byte but an integer.