C charro98120165 Member Licensed User Longtime User Apr 16, 2013 #1 HI, how send an int (integer) with asincstreams, tanks.
S Scantech Well-Known Member Licensed User Longtime User Apr 17, 2013 #2 I am not sure what device you are communicating with but, here is an example on sending byte or check out this http://www.b4x.com/forum/additional-libraries-classes-official-updates/28176-usbserial-library-2-0-supports-more-devices-2.html#post163615 B4X: 'send 4 bytes Dim b(4) As Byte b(0) = 12 b(1) = 13 b(2) = 243 b(3) = 244 astreams.Write(b) Last edited: Apr 17, 2013 Upvote 0
I am not sure what device you are communicating with but, here is an example on sending byte or check out this http://www.b4x.com/forum/additional-libraries-classes-official-updates/28176-usbserial-library-2-0-supports-more-devices-2.html#post163615 B4X: 'send 4 bytes Dim b(4) As Byte b(0) = 12 b(1) = 13 b(2) = 243 b(3) = 244 astreams.Write(b)
Erel B4X founder Staff member Licensed User Longtime User Apr 17, 2013 #3 You can use this library to convert the int to 4 bytes: ByteConverter library Another option is to use RandomAccessFile library. Upvote 0
You can use this library to convert the int to 4 bytes: ByteConverter library Another option is to use RandomAccessFile library.