Huong Cao

unread,
Mar 25, 2016, 1:20:45 PM3/25/16
to MIT App Inventor Forum

Nhập mã vào đây...
Anyone can help me find out my error ? When I sent data from Arduino to app inventor via blutooth (Serial.print("...");   )  and save to labe  it display not correctly. I have try many time but not success !

The file "1.jpg " is correct and from 2-8 is wrong data
I attack aia file if necessary 

This is block cause an errror








2.jpg
3.jpg
4.jpg
5.jpg
6.jpg
7.jpg
8.jpg
1.jpg
Blutooth_Arduino (3).aia

Taifun

unread,
Mar 25, 2016, 3:32:17 PM3/25/16
to MIT App Inventor Forum

how do you want to display your data?
probably you better use println instead of print?
and don't hesitate to do a search in the forum, there are plenty of Arduino and bluetooth examples around...
Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 



Huong Cao

unread,
Mar 26, 2016, 7:43:53 AM3/26/16
to mitappinv...@googlegroups.com
I want to sent muti sensor value from arduino to android via blutooth and  seperate data each value from arduino to each label in app inventor by ";" charactor.
Now I sent muti sensor value to 1 label without seperate It also make an error
I also use println("value") but no effect

Taifun

unread,
Mar 26, 2016, 1:50:27 PM3/26/16
to MIT App Inventor Forum
sorry, I do not understand the issue, you might want to elaborate
in case there is an error, it probably would help to tell us what kind of error you get...
probably @ABG has an idea?
Taifun

Abraham Getzler

unread,
Mar 26, 2016, 8:37:06 PM3/26/16
to MIT App Inventor Forum
I see 4 values in your incoming message, separated by commas (,) that you want to put into 4 labels,
and you want to send all 4 values together and receive them together?

You have the proper delimiter value of 10 in your screen1 btclient, but you did not request a full message, only what was available.
See attached for how to do it.

Be sure you use print() for values 1,2,3 but println() for value 4 to terminate message only at the end.

By the way, screen2 can not share a bt connection with screen1.

ABG


BTClient_Receive_till_delimiter.png

Abraham Getzler

unread,
Mar 26, 2016, 9:02:23 PM3/26/16
to MIT App Inventor Forum
Reviewing my post, I notice that you don't split up the incoming message in the timer block.

Wouldn't that be the logical place to split it up for the other 4 labels,
immediately after it has changed?

ABG


Huong Cao

unread,
Mar 27, 2016, 1:46:08 AM3/27/16
to MIT App Inventor Forum
As I said, I had this error even when I didn't seperate to each label.

I used 1 label to recive muti data sensor it also make an error.

If I seperate, 4 label will also have error as 1 label. So I start my problem at 1 label to easy to see

Ps: I will try to fix as you say in arduino and block you sent me. Hoping that it will work

Message has been deleted

Huong Cao

unread,
Mar 27, 2016, 2:14:36 AM3/27/16
to MIT App Inventor Forum
I want to sent my muti sensor value from my arduino to app inventor in muti label.
But even when i use 1 label to recive muti sensor. It still arrange not correctly. So I start my problem at 1 label to easy exchage
You can compare each pictures I upload at circle I mark for detail

Huong Cao

unread,
Mar 27, 2016, 11:36:43 AM3/27/16
to MIT App Inventor Forum
It seem to be successful, thank you so much for helping me. I hope I will be studing more from you - Abraham Getzler and Taifun7

Tony Nguyen

unread,
Mar 28, 2016, 11:23:07 AM3/28/16
to MIT App Inventor Forum
Hi Huong,

Your app looks great. May I ask if you are in Vietnam so that we could collaborate regarding App Inventor.

Regards,

Huong Cao

unread,
Mar 28, 2016, 11:53:26 AM3/28/16
to MIT App Inventor Forum
Cảm ơn b đã quan tâm đến bài viết của mình, mình rất sẵn lòng giúp đỡ b trong khả năng. B có thể liên hệ với mình qua email để tiện trao đổi
Reply all
Reply to author
Forward
0 new messages