sherzaad:
this is your original request and I have gone thru this thread and I'm lost!I would like to understand this:
"lets say if int id=200."
If you were to use serial.write to print it to serial monitor u'd get some weird character... that not what you want, right?
what you want to achieve is to somehow use serial.write to achieve what serial.print(200,DEC) can do, right?
FYI to do that the arduino would spit out 4 bytes as ASCII '2' (0x32), '0' (0x30), '0' (0x30) and '\0' (0x00).Am I correct to understand that all that you want the arduino to spit out is the first 3 bytes?
You would spit out 3 bytes - the null terminator is not sent to the serial port.