Go Down

Topic: 'BYTE' keyword is no longer supported (Read 5022 times) previous topic - next topic


Hi guys,

I am trying to compile the following code:

Code: [Select]
int sensorPin = 0; // Select input pin
int val = 0;
void setup() {
Serial.begin(9600); // Open serial port
void loop() {
val = analogRead(sensorPin)/4; // Read value from sensor
Serial.println(val,BYTE); // Print variable to serial port
delay(100); // Wait 100 milliseconds

It gives the following error:

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

I have to send val to Processing in byte format.

How can I modify my code?



How can I modify my code?

I'd strongly suggest that you do as told, and use Serial.write() instead.

You can search the forum for the other 800 posts asking the same question.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131