Skip to first unread message

Sebastian Rueda

unread,
Jul 10, 2017, 5:57:33 PM7/10/17
to MIT App Inventor Forum
Hi to all! 

i'm currently writting a quick program that connects my android device with a microcontrolled device. I want communication between booth devices to be held through Hex array frames that are send when i press the send button on the Android device screen.

My question is how to send a hex array.

This is one of the frames i want to send 0x7E 0x00 0x01 0x52 0x00 0x2D 0x0a. I have tried to use the Bluetooth client send Bytes using a list and doing the conversion from the decimal representation of the array ( 126 0 1 82 0 45 10). The attached figure shows the way i'm trying to send the first byte of my array, the result is not good i would want to know if some of you know a good way to implement this.

thanks 

Captura.PNG

Abraham Getzler

unread,
Jul 10, 2017, 6:39:29 PM7/10/17
to MIT App Inventor Forum
You already converted the 0x7E to 126, so the conversion block you added is counterproductive.
Just use the 126 there.
Use the blue box to add sockets for the other decimal numbers and add them to the make a list block.
You should have 7 items in that list.
Let us know if it works for you.

Sebastian Rueda

unread,
Jul 11, 2017, 10:40:38 AM7/11/17
to MIT App Inventor Forum
Hi Abraham! 

Thanks for your help! it was the solution i was looking for. It worked fine

Sebastián 
Reply all
Reply to author
Forward
0 new messages