05-27-2014 09:41 AM
I run a counter to measure the number of pulses count and i send that number over serial to bluetooth HC 06 to virtual serial port in my laptop . to do that i break unsigned 32 bit value count into 8 bit pieces a b c d shift it 0, 8, 16 and 24 bit positions to the right to send it via UART .problem is how to reassemble 8 bit pieces with labview on the other end.i have to shift a b c d 0, 8, 16 and 24 bit positions to the left and reassemble them with or .this is a c example :
unsigned char a,b,c,d;//final result dcba
a=0x09;b=0xEF;c=0xCD;d=0xAB;
intcount;
count=0x00000000;
count=count|a;
inttemp=b<<8;
count=count|temp;
temp=c<<16;
count=count|temp;
temp=d<<24;
count=count|temp;
Solved! Go to Solution.
05-27-2014 09:58 AM - edited 05-27-2014 09:59 AM
05-27-2014 10:00 AM
In LabVIEW just use decimate array and join numbers.
05-27-2014 11:32 AM
05-27-2014 12:00 PM - edited 05-27-2014 12:00 PM
Unflatten From String makes this easy.
05-27-2014 12:04 PM - edited 05-27-2014 12:05 PM
Oh, you can use an array if you have multiple samples...
05-28-2014 07:29 AM - edited 05-28-2014 07:52 AM
thank you guys for your guidance and support that's really help me . just another question , i have two serial to bluetooth devices both send count to pc.what i want to know is can i have the name or mac adress anything i can identify bluetooth device without seding data to it with visa if possible.second thing can i connect on with a device the close session and connect with second device on the same com is that possible.i want to use bluetooth as rfid to identify a wagon if u understand what i mean .anyway i am new here so ur help push me to continue and to learn more .thanks.