connecting bluetooth CH-06 to uno arduino

my project is connecting bluetooth CH-06 to uno arduino and send msg to mobile when the analog input reach the threshold. But i got some errors, I hope anyone can help please.

thanks

#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
float A = A0;
float B = A1;
float C = A2;
float D = A3;
float thresh = 614;

float XA = 0;
float XB = 0;
float XC = 0;
float XD = 0;

void setup()
{
pinMode(A,INPUT);
pinMode(B,INPUT);
pinMode(C,INPUT);
pinMode(D,INPUT);

Serial.begin(9600); //open serial port, sets data rate to 38400 bps
mySerial.begin(9600); //the value of baud rate is 9600 , default
delay(200);
}

void loop()
{
XA = analogRead(A);
XB = analogRead(B);
XC = analogRead(C);
XD = analogRead(D);

if (XA >= thresh || XB >= thresh || XC >= thresh || XD >= thresh)
{
delay(100);
mySerial.print("Situation is Dangerous");
delay(100);
}
else
{
mySerial.print("Situation is GOOD");
delay(100);}
}

Serial.write(XA);
delay(100);
Serial.write(XB);
delay(100);
Serial.write(XC);
delay(100);
Serial.write(XD);
delay(200);

}

(deleted)

float A = A0;
float B = A1;
float C = A2;
float D = A3;

I've heard of floating pins.

Does this help at all?

DO NOT CROSS-POST, CROSS-POSTING WASTES TIME.

my project is reading 4 analog signal input and once any of the input reach threshold, the uno arduino will send msg through the Bluetooth to android device. I have some errors i didn't get them so please if anyone can help I will be thankful...

my code

#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
float A = A0;
float B = A1;
float C = A2;
float D = A3;
float thresh = 614;

float XA = 0;
float XB = 0;
float XC = 0;
float XD = 0;

void setup()
{
pinMode(A,INPUT);
pinMode(B,INPUT);
pinMode(C,INPUT);
pinMode(D,INPUT);

Serial.begin(9600); //open serial port, sets data rate to 38400 bps
mySerial.begin(9600); //the value of baud rate is 9600 , default
delay(200);
}

void loop()
{
XA = analogRead(A);
XB = analogRead(B);
XC = analogRead(C);
XD = analogRead(D);

if (XA >= thresh || XB >= thresh || XC >= thresh || XD >= thresh)
{
delay(100);
mySerial.print("Situation is Dangerous");
delay(100);
}
else
{
mySerial.print("Situation is GOOD");
delay(100);}
}

Serial.write(XA);
delay(100);
Serial.write(XB);
delay(100);
Serial.write(XC);
delay(100);
Serial.write(XD);
delay(200);

}

gdp_tweel.ino (974 Bytes)

There are two } after

Serial.print ("Situation is good");
delay(100);

.
Remove one

Check where the loop() function ends in your program.

HINT - it is not at the end of the code that you have posted.

Auto format may help you see the problem.

I have some errors i didn't get them

And neither did we (hint for next time)

And which part of "DO NOT CROSS-POST" didn't you understand?

Duplicates deleted.