Thread
:
Send Byte
View Single Post
#
4
18-01-2005, 00:18
Dave Flowerday
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Re: Send Byte
Quote:
Originally Posted by
the_undefined
(PS: Is there a way to send an Integer as 2 Bytes instead of an ASCII as well?)
Try this:
Code:
int x = 0x1234; printf("%c%c", (x >> 8), (x & 0xff));
That should send 2 bytes: 0x12 then 0x34.
Dave Flowerday
View Public Profile
Visit Dave Flowerday's homepage!
Find all posts by Dave Flowerday
Find CD-Media Photos by Dave Flowerday
Find CD-Media Papers by Dave Flowerday