So here"s the thing I need to build some kinda simple calculator where my input from serial is HEX
but output Serial.write or print is in ASCII…
I can easily do oposit but got some problem with this way…
first the HEX is usually 2 characters which is equal to one of ASCII for example HEX 31 = 1 ASCII
HEX 46 = F ASCII
just because of that your input has to be an array or string like I guess, right???
or perceived by Arduino as HEX… I defanatly don’t know how to do it couse it’s seems like everything that arduino gets from serial is always INTs and in singles… then you interpreter it the way you want it right???
Basicaly from 2 chars I got to get one and then interpreter it in Serial back with Serial.write
So it’s got be some how like that
int Str2 + Str = Serial.write(result, ASCII) // one character
- but not the plus but what???
So here is my code can some one add the needs pls…
int thisByte1 = 33;
for (int i=0;i<2;i++) Str2*=0; //возрат на ноль нах*
- int i;*
- for(i=0; i<2; i=i+1)*
_ Serial.write(Str2 );_
* Serial.println(" ");*
Yep the array needs to be in ints from them it’s actually easy to convert but the function readBytes doesn’t wanna work even with bytes… how to read in to array diferent way for me is problem too…
That’s way Im here