RE: Connect my arduino ble to my phone via bluetooth

Excuse me professor. Sorry i'm still a beginner in mit app and arduino ble, maybe there is an example to turn on the led or monitor Variable resistor changes?
I study for college needs in the final semester

Sorry Muhammad - can't help you directly, but if you search this forum for 'Bluetooth' you will definitely find the solution.

I've been looking for it but I can't find a simple one for my experiment which is to turn on the LED

Most use esp 32 or HC 05, it's very different from BLE in the void loop



From my blocks and Designer, is it any mistake?

and sorry, what about my arduino code?
You can laugh if you wanted to, because i'm very very beginner at this arduino

#include <ArduinoBLE.h>
#define BLE_UUID_TEST_SERVICE "9A48ECBA-2E92-082F-C079-9E75AAE428B1"
#define BLE_UUID_ACCELERATION "2713"
#define BLE_UUID_COUNTER "1A3AC130-31EE-758A-BC50-54A61958EF81"
#define BLE_UUID_STRING "1A3AC131-31EF-758B-BC51-54A61958EF82"
#define BLE_UUID_BUFFER "1A3AC132-31ED-758C-BC52-54A61958EF82"
#define BLE_UUID_RESET_COUNTER "FE4E19FF-B132-0099-5E94-3FFB2CF07940"

BLEService testService( BLE_UUID_TEST_SERVICE );
BLEFloatCharacteristic accelerationCharacteristic( BLE_UUID_ACCELERATION, BLERead | BLENotify );
BLEUnsignedLongCharacteristic counterCharacteristic( BLE_UUID_COUNTER, BLERead | BLENotify );
BLEBoolCharacteristic resetCounterCharacteristic( BLE_UUID_RESET_COUNTER, BLEWriteWithoutResponse );
BLECharacteristic stringCharacteristic( BLE_UUID_STRING, BLERead | BLENotify,"TEST1" );
BLECharacteristic buffCharacteristic( BLE_UUID_BUFFER, BLERead | BLENotify,20,(1==1) );

int led1 = 2;
int led2 = 3;
int led3 = 4;
int led4 = 5;
// the setup function runs once when you press reset or power the board
void setup() {
Serial.begin(19200);
BLE_BT.begin("BLE_Control");
// initialize digital pin as an output.
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);

}

// the loop function runs over and over again forever
void loop() {
if(BLE_BT.available()>0){
digitalWrite(led1, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(led1, LOW); // turn the LED off by making the voltage LOW
digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(led2, LOW); // turn the LED off by making the voltage LOW
digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(led3, LOW); // turn the LED off by making the voltage LOW
digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(led4, LOW); // turn the LED off by making the voltage LOW
}
Serial.print("\n");
}

that's my arduino code

Which particular Arduino are you using? AFAIK, the only one that had native BLE support was the Arduino 101, which was discontinued (but we have extensions supporting it). If you're using Arduino with a separate BLE module, such as the HM-06, then you'll want to search here as there are plenty of examples of how to use this particular module. If you're using something else, people will need more information to help you.

Thanks for your help sir
so arduino ble 33 can't use bluetooth while sending data to android with mit app?

Yes, it can - search the forum forum for Arduino BLE 33 - use the data types found in other's projects.