cattledog:
The HM 10 and the iphone are outside of my familiarity with the the HC 05 and android, but that said, here's a possible path for you to take which will simplify things. There is often no need to use the monitor and the phone at the same time. Usually, the phone is to replace the monitor for serial send and receive and display from the Arduino.Write your Arduino program with input and output to the Serial monitor. No Bluetooth involved. Your starting point should be an arduino program which does what you want with the Serial monitor.
After that program is uploaded, you can connect the bluetooth monitor to the hardware serial pins of the Arduino. Remember to connect RX to TX and TX to RX. Serial monitor should be closed.
Then, the connected phone app should replace the Serial monitor for input to the arduino and display of the output data. Be sure that the baud rates and character string line ending like CR and NL are the same with the phone app and the serial monitor.
Thank you!
I tried to do exactly as you said, use following code:
int val1, val2;
int tempPin1 = A0;
int tempPin2 = A1;
void setup()
{
Serial.begin(9600);
}
void loop()
{
val1 = analogRead(tempPin1);
float C1 = ( val1/1024.0)*500;
Serial.print("TEMPRATURE C1 = ");
Serial.print(C1);
Serial.print("*C");
Serial.println();
delay(1000);
val2 = analogRead(tempPin2);
float C2 = ( val1/1024.0)*500;
Serial.print("TEMPRATURE C2 = ");
Serial.print(C2);
Serial.print("*C");
Serial.println();
delay(1000);
}
serial monitor closed, HM-10 TX connected to arduino RX and HM-10 RX connected to arduino TX.
my app connected to HM-10 and still didn't receive anything from arduino on my iphone!
where is my mistake?!
thank you very much