I'm sending serial commands from processing to an arduino teensy via xbee and want to have it read 15 different values/bytes at a time. Negative (signed) integers are transferred serially without a problem, however when I try to use a negative integer as a termination value for the buffer, it never recognizes it as such.
All values I'm sending are positive integers, so I want to keep all 128 values reserved for commands and not have to worry about one being the termination character. Is there something I'm missing, or is it just not possible to have a negative integer as that termination character??
readBytesUntil(-10, buff, BUFF_SIZE);
Thanks in advance