Error 503 the speciefic adress is not a valid bluetooth MAC adress


const int trigPin = 6;
const int echoPin = 7;

const int btrigPin = 10;
const int bechoPin = 11;

long duration;
int distance;

long bduration;
int bdistance;

char Incoming_value = 0;
char Incoming_value1 = 0;
char Incoming_value2 = 0;

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
pinMode(trigPin, OUTPUT); 
digitalWrite(trigPin, LOW);
   pinMode(echoPin, INPUT);
   pinMode(btrigPin, OUTPUT); 
digitalWrite(btrigPin, LOW);
   pinMode(bechoPin, INPUT);
pinMode(3, OUTPUT); 
   pinMode(4, OUTPUT); 
   pinMode(5, OUTPUT);


}

void loop() {
  // put your main code here, to run repeatedly:

digitalWrite(trigPin, LOW);
delayMicroseconds(2);

digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);
distance= duration*0.034/2;




digitalWrite(btrigPin, LOW);
delayMicroseconds(2);

digitalWrite(btrigPin, HIGH);
delayMicroseconds(10);
digitalWrite(btrigPin, LOW);

bduration= pulseIn(bechoPin, HIGH);
bdistance= bduration*0.034/2;

Serial.println("distance: ");
Serial.print(distance);   
Serial.print("|");
Serial.println("bdistance: ");
Serial.print(bdistance);
delay(300);


if(Serial.available() > 0)  
  {
    Incoming_value = Serial.read();      
    Serial.print(Incoming_value);        
    Serial.print("\n");        
    if(Incoming_value == '1')             
      digitalWrite(3, HIGH);  
    else if(Incoming_value == '0')       
      digitalWrite(3, LOW);
  }
      if(Serial.available() > 0){   
      Incoming_value1 = Serial.read();      
    Serial.print(Incoming_value1);        
    Serial.print("\n");        
    if(Incoming_value1 == '2')             
      digitalWrite(4, HIGH);  
    else if(Incoming_value1 == '3')       
      digitalWrite(4, LOW);
      }
      if(Serial.available() > 0){
      Incoming_value2 = Serial.read();      
    Serial.print(Incoming_value2);        
    Serial.print("\n");        
    if(Incoming_value2 == '4')             
      analogWrite(5, 255);  
    else if(Incoming_value2 == '5')       
      analogWrite(5, 0);
  }             
}

this is my code for control 3 leds et measure 2 distance with HCSR04 and module bluetooth

1
2
3


5

i'am using isis for siimulate with application app inventor and on the application shiw me like this
281874978_1129452460952793_4382306739699268831_n

list-split----> ClientBluetoot.Receivetext: -1

You can also separate the values ​​with a comma, instead of |

1 Like

Sorry it dosent work
I have change my work with this
In code arduino i wrote :

Serial.print(distance1);
Serial.print("|");
Serial.print(distance2);
Delay(300);

I want every sensor give distance in right position

Serial.println(distancia2);

DelimiterByte: 10

1 Like

Means the problem with bluetooth client 10

Arduino should send:

Serial.print(distance1);
Serial.print("|");
Serial.println(distance2);
delay(300);

println means text with end of line, end of line is \n, it is code 10.
Check ASCII codes.

App Inventor. Designer. BluetoothClient. DelimiterByte: 10
it means that when it receives end of line, character 10, it shows the message.

Here many examples