Hi, so I have problem with receiving/reading multiple values in same time from Arduino using library BluetoothLE. I'm working on project which will read measured heart rate, steps(pedometer) and tempreature data from Arduino using BLE but my problem is that when I try to display that data in 3 different "labels" I only get update in one label, which is heart rate, no matter what value of steps or temperature changed in that labels. So can somebody please tell me how to reserve for example 19B10000-E8F2-537E-4F6C-D104768A1215 reserve label and when value on arduino changes to be displayed in APP, and when value changes on 19B10001-E8F2-537E-4F6C-D104768A1215 to be displayed instantly in second label... I checked in APPs like LightBlue and there is everything working just fine, so its lack of my knowledge for using app inventor.
So can somebody help me, thanks in advance
I lost my crystal ball, therefore there is no way we can help you, unless you upload your blocks and/or .aia (search this forum for how to do it).
Hi, in this app I only get heart rate and temperature values in this label. And steps aren't shown any where.
health.aia (198.3 KB)
Something to check is to see if you get something that you do not test for by adding an extra else in the ByteRecieved block. Make a temporary list for that, just for debugging, or a label would be enough.
Then, at the other side, are you sure you send that steps information? maybe also upload the .ino file, if you cannot find it.
@Ghica To excuse my self, I'm very new to this. Could be one of solution be to read and diplay info using charts from stored information?
I do not think so. Maybe later, when you are sure what you are really receiving.
What I see in your .ino file is that you are sending strings. But in your AI app you are receiving bytes. Maybe you should try to use the receiving strings blocks.
It could be that you are not getting readable values, because the arduino will be sending ASCII, but we can find a solution fr that too.
Let us know what happens.
BLEByteCharacteristic heartChar("19B10001-E8F2-537E-4F6C-D104768A1215", BLEWrite | BLENotify);
BLEByteCharacteristic stepChar("19B10002-E8F2-537E-4F6C-D104768A1215", BLEWrite | BLENotify);
BLEByteCharacteristic tempChar("19B10003-E8F2-537E-4F6C-D104768A1215", BLEWrite | BLENotify);
I mean this is byte so I don't understand it. But I changed to string.
And using apps I found out that Arduino uses Hex
What do you mean by this?
Yeah sorry for my bad english. Using apps for BLE communication it seems that Arduino communicates using HEX
OK. Now, did you try to read strings in App Inventor instead of bytes, like I suggested?
Not yet, just to make sure before I start. I need put register for strings and read strings? Does utf16 need to be true or false or something else?
I need put register for strings and read strings? Does utf16 need to be true or false or something else?
Yes, yes, and I do not know. Try both.
I get changes in Serial and other app read right value and changed that in App Inventor and still nothing happened
upload your new .ino and .aia files.
Little update on journey when I use
I don't get any changes in app, but when I use this
I get all values in left field. If ap is working right it should values be separated in left and right field
health_1 (1).aia (198.1 KB)
sketch_mar4a.ino (4.6 KB)
How many UUIDs do you have?
- Heart
- Steps
- Temp
?
Should you be checking a Steps UUID for that FIELDSTEPS Label?
This is just test app and currently I'm testing everything. Just to make this work so thats why I'm putting values in different labels. And yes I have 3 different uuids for 3 different values. When using apps like LightBlue, BLE Scanner, BLE Tester and etc. I get right values and now when I use else in "Strings Recived" I get values displayed. I'm willing to try string spliting if for start someone whants to explain me what to do