Go Down

Topic: Serial.print(13, BYTE); equivalent command in Arduino 1.0 (Read 34993 times) previous topic - next topic


Serial.print(13, BYTE);

when i write the following instruction i get a compile error message saying that BYTE is no longer supported
what is the equivalent instruction to use in Arduino 1.0


Jan 01, 2012, 01:27 pm Last Edit: Jan 01, 2012, 01:31 pm by dxw00d Reason: 1
The error I get is...

As of Arduino 1.0, the 'BYTE' keyword is no longer supported.
Please use Serial.write() instead.

so the compiler actually tells you what to use.

Also, reading the release notes http://arduino.cc/en/Main/ReleaseNotes

* The behavior of Serial.print() on a byte has been changed to align it
 with the other numeric data types. In particular, it will now print
 the digits of its argument as separate ASCII digits (e.g. '1', '2', '3')
 rather than a single byte. The BYTE keyword has been removed. To send a
 single byte of data, use Serial.write() (which is present in Arduino 0022
 as well).


You can use
Code: [Select]

Code: [Select]

--- bill

Go Up