BLE - can't connect

Hi guys pls help me with this code iam not coonect the blutooth

Do you use the latest version?
See also

(Canned Reply ABG - BLE FAQ with Latest Versions for Permissions)

Taifun

please give what is the latest Bluetooth version to use for aurdino.

After connecting to Bluetooth on my mobile, my MIT app is not showing any Bluetooth modules.
I am using one pulse, a Nord device, and its Bluetooth version is 5.1. I writing my MIT code and Arduino code.
char Incoming_value = 0;

void setup()

{

Serial.begin(9600);

pinMode(13, OUTPUT);

}

void loop()

{

if(Serial.available() > 0)

{

Incoming_value = Serial.read();      

Serial.print(Incoming_value);        

Serial.print("\n");        

if(Incoming_value == '1')            

  digitalWrite(13, HIGH);  

else if(Incoming_value == '0')      

  digitalWrite(13, LOW);  

}

}

MIT app code:


aurdino code

Hello Mythily_Veeravalli

Your Arduino Sketch - that doesn't look like BLE code - where are your UUIDs?

Your App Inventor Blocks - they are BT Classic, not BLE.

Your Nord Device - that's a 'one plus', not a 'one pulse' right?

What is the exact model name of your Arduino?

If your Arduino model does not have BLE built-in, what is the exact model of the BLE module you are using?

The most recent App Inventor BLE Extension is:

MIT BLE Extension: Version: 20230728 Released: 28-07-2023 Package Name: edu.mit.appinventor.ble-20230728.aix

Finally - what is your project supposed to do? Control an LED?

I obtained this code from this website.MIT app community
Yes, it's a one pluse nord.

I am using arduino UNO
I am using BLE HC05
and help me how to rewrite the same code using MIT BLE vesriob

what is your project supposed to do?

The HC05 modules are not BLE

See my website:
https://www.professorcad.co.uk/appinventortips#TipsBluetooth

in my project, i want to blink an led using an app , so I have used MIT App Inventor to create an app , and auruno uno to code and bluetooth module is HC05

So stay with BT Classic then. Your Sketch looks about right (replace Serial.print("\n") with Serial.println()) but there are errors in your App Blocks. Also, you might be missing some Google Android permissions - depends on the Android Version of your device (mobile phone).

What version of Android does your mobile have?

Are you confident that you have connected the HC05 and the LED's to the UNO correctly?

Here is an AI2 project that you can view to see what you may have missing in your project - for example your attempt to connect is wrong and a little time should be given to scanning for devices - lots of other bits in there too. It sends several commands and uses a Block List because of that - your 2 button approach for the LED is better in your case.

BT_Send_Commands.aia (9.5 KB)