Go Down

Topic: How to replace Byte in serial command (Read 866 times) previous topic - next topic

Vik009

Hi,

I have this code line in one of the example codes for the GPRS shield.

Code: [Select]


GPRS_Serial.print(0x1A,BYTE);

[\code]

This byte word is no longer supported by Arduino 1.0. Can I use just the below mentioned code for the same functionality.

[code]

GPRS_Serial.print(0x1A);

[\code]
[/code]

majenko

What is the output supposed to look like?

You can caste the value to anything you like (within reason) with:

Code: [Select]

Serial.print((byte)0x1A);


(by the way, the terminating tags use / not \)

michael_x

Sending a raw byte is done with
    GPRS_Serial.write(0x1A);

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!

Arduino
via Egeo 16
Torino, 10131
Italy