Hello everyone
I am trying to connect a simple project of LED blinking using Hiletgo HC-05 wireless Bluetooth module with Arduino Uno
everything is ok, but the response of the LED to the button in my smartphone application sometimes is very slow
what is the reason for this slowness and how can I increase the response
does the application I used affect the speed
below is my code
and this is my circuit
I am trying to connect a simple project of LED blinking using Hiletgo HC-05 wireless Bluetooth module with Arduino Uno
everything is ok, but the response of the LED to the button in my smartphone application sometimes is very slow
what is the reason for this slowness and how can I increase the response
does the application I used affect the speed
below is my code
Code:
#include <SoftwareSerial.h>
SoftwareSerial MyBlue(2, 3); // RX | TX
int flag = 0;
int LED = 8;
void setup()
{
Serial.begin(9600);
MyBlue.begin(9600);
pinMode(LED, OUTPUT);
Serial.println("Ready to connect\nDefualt password is 1234 or 000");
}
void loop()
{
if (MyBlue.available())
flag = MyBlue.read();
if (flag == 1)
{
digitalWrite(LED, HIGH);
Serial.println("LED On");
}
else if (flag == 0)
{
digitalWrite(LED, HIGH);
Serial.println("LED Off");
}
}
Last edited: