Go Down

Topic: serial communication question (Read 316 times) previous topic - next topic

permnoob

this is the easiest question you will answer today, i promise.  I would jsut test it myself buuuut I may have made my arduino a biiiiit not worky worky.

if I try to write the value 400 to the serial port, what comes out the port? say for example

Serial.print(400);
or
Serial.write(400);

I know it compiles, but that is about it.

PaulS

Serial.print(400) will send '4', '0', '0' to the serial port.

Serial.write(400) will send 144 to the serial port - the write() function takes a byte, so only the low order byte (containing 144) is sent. The high order byte is ignored.

Go Up