Go Down

Topic: How to replace Byte in serial command (Read 804 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 \)
Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

michael_x

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

Go Up