Ok so I am doing a project from the book Arduino Cookbook - Micheal Margolis
and on page 89 (of the book not the reader)
So here is the code
// You want to send serial data from Arduino displayed as text, decimal values, hexadecimal, or binary.
/*
* SeriaFormatting
* Print values in various formats to the serial port.
*/
char chrValue = 65;
int intValue = 65;
float floatValue = 65.0;
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println("chrValue: ");
Serial.println(chrValue);
Serial.println(chrValue,BYTE); // need to be reworked
Serial.println(chrValue,DEC);
Serial.println("intValue: ");
Serial.println(intValue);
Serial.println(intValue,BYTE); // need to be reworked
Serial.println(intValue,DEC);
Serial.println(intValue,HEX);
Serial.println(intValue,OCT);
Serial.println(intValue,BIN);
Serial.println("floatValue: ");
Serial.println(floatValue);
delay(1000); // delay a second between numbers
chrValue++; // to the next value
intValue++;
}
And the image is what I get.
I researched and all I get is the word byte not BYTE.
I need help
Thanks for helping me this is my first time in the forum so I'm sorry for the bad formatting.
If the picture doesn't work then here is the error message
Arduino: 1.6.9 (Windows 10), Board: "Arduino/Genuino Uno"
C:\Users\kati\Documents\Arduino\Arduino Jar(Arduino Cookbook)\SerialFormatting\SerialFormatting.ino: In function 'void loop()':
SerialFormatting:18: error: The 'BYTE' keyword is no longer supported.
As of Arduino 1.0, the 'BYTE' keyword is no longer supported.
Please use Serial.write() instead.
Serial.println(chrValue,BYTE); // need to be reworked
^
exit status 1
The 'BYTE' keyword is no longer supported.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.