Thread: Send Byte
View Single Post
  #4   Spotlight this post!  
Unread 18-01-2005, 00:18
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
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.