char
is for characters.
byte
is for numbers. From what I have read here, you're dealing with numbers only. So forget about
char
completely for now and change it all to
byte
.
Then you have
byte y = conversion(byte );
, which doesn't work because you pass a type as parameter where a value of type
byte
is expected. Change to
byte y = conversion(0x42);
.
The "42" represents some value. I don't know what you really want to convert. Put whatever you want between the brackets of
convert()
.