send port register status over serial

I'm wondering if there is a way to send the status of a port register over serial directly, i.e. send PIND as one byte and NOT a collection of bytes representing the ASCII values of whatever that number happens to be. Serial.print() and Serial.println() seem to only be good for sending ASCII representations of data, unless there's something I'm not understanding (which seems pretty likely!)

Thanks, Cameron

Did you check the Reference page for the Serial.print command?


Serial.print(b, BIN);


Serial.print(b, BYTE);

command seem like they might be what you are looking for.

Thanks. Serial.print(b, BYTE) actually did the trick. I was misunderstanding the help file and was worried that Max was going to interpret the number it received over serial as some ASCII value, but it worked just casting it as an int in Max.

If I sent a byte with Serial.print(b, BIN) the computer would actually receive bytes: one each for the 0 or 1 needed to represent the 8 bits of my byte.