i want to know for executing "Bluetooth.available();" how much time is required, if connection is available, also in case of non availability of connection how much time is spent.
also for
Bluetooth.read() ; Bluetooth.println("LED On!");
How much time is required .
my project is time sensitive so asking . kindly help
part of my code :::::::
#include <SoftwareSerial.h>
SoftwareSerial Bluetooth(10, 9); // RX, TX
int LED = 13; // the on-board LED
int Data; // the data received
void setup() {
Bluetooth.begin(9600);
Serial.begin(9600);
Serial.println("Waiting for command...");
Bluetooth.println("Send 1 to turn on the LED. Send 0 to turn Off");
pinMode(LED,OUTPUT);
}
void loop() {
if (Bluetooth.available()){ //wait for data received
Data=Bluetooth.read();
if(Data=='1'){
digitalWrite(LED,1);
Serial.println("LED On!");
Bluetooth.println("LED On!");