Hey .. sorry i found that u re quite good on bluetoothLE

thanks for reading my message at first … i m tryin to read data from arduino —> hm-10----> app
i ll send u my blocks …
the connection is established … but i receive on the text view [“u”]
does not get the value of that caracteristic uuid … any help please ?


thanks …

1 Like

Hi

“Register for strings” or “read strings” - they effectively do the same thing so only use one (to choose, read their tool tips by hovering the mouse over them).

Where did you get the Uuid’s from?

Can we see your Arduino Sketch?

it s a sample sketch …
but when i try to read i find nothing …
#include <SoftwareSerial.h>
SoftwareSerial mySerial(0,1);
void setup()
{
mySerial.begin(38400);
Serial.begin(9600);
delay(100);
}
void loop()
{if (Serial.available()>0)
mySerial.write(Serial.read());
if (mySerial.available()>0)
Serial.write(mySerial.read());
}

nd to get get the uuid’s i ve used BLE scanner to test the service that gets the data on BLE scanner when i enable the notifier i get the value … but when i use my app i get nothing …

…Are you sure you have the Uuids the right way round (Service and Characteristics)?

What exactly do you want to send from the Arduino to your App? The Sketch you are using makes no sense to me.

i m just testing to send any number from the serial monitor nd receive it on my app … just a first step then i ll add sensor to receive there data

note : when i send data from serial monitor … i can read it via “BLE scanner” app

on BLE scanner i find data under the same uuid’s that i ve put in the app inventor …

OK

Set the Clock Timer values in the Blocks - the timer should not be switched on until the connection is made.

Set the timer to 1000.

Use the test Sketch attached.
//ArduinoToApp.ino 29/10/2019 21:56:22

//Fake data stream to test App

// include the library code:
#include <SoftwareSerial.h>

//vars
unsigned int igUpdateTime;

void setup()
{
Serial.begin(9600);
igUpdateTime = millis();
}

void loop()
{
if(millis() - igUpdateTime > 2000) //Loop approx every 2 seconds
{
igUpdateTime = millis();

                     if (Serial.connected())
                     {
                               //Bluetooth to App
                               Serial.print("Hello");
                               Serial.println();        //This last line tells App "End of Data" = Ascii LineFeed Char Number 10
                     }
           }

}BasicTestArduinoToApp.ino (826 Bytes)

You also need to ensure that, in addition to Bluetooth being enabled on your Android device, Location is enabled.

If you chose “Register for Strings”, the data collection should work without a clock timer. We use “Read Strings” with a clock timer when process speed is important (e.g., controlling something that moves).

ok all my tests … always my bluetooth nd position are on … i knew that …
thanks for ur code @ChrisWard i try it … nd i set my build like this … but always get this result … u can see images


Here BLE examples, maybe you can get some ideas.

…and see attached Project file for the most basic setup.
BLE_RECEIVE_STRINGS.aia (162.2 KB)

i ll try everything … thanks a lot every one … i m sorry my arduino crushed … i ll get replacement nd i ll reply … so happy for your help i ll notify u when i ll try it … thanks again

Set your Arduino up on a solid surface (I screwed mine to chopping board, with insulation pillars) and it’s a good idea to keep it cool - you can get by with a desktop fan. I use an old PC fan.

Links:
https://www.professorcad.co.uk/appinventortips#TipsArduino