Go Down

Topic: ARDUINO DUE is not receiving serial data from HC05  (Read 837 times) previous topic - next topic

ahmedshah

 Hello Community,

I am facing a problem for last couple of weeks and i don't find the solution till now. Pls Help ..

I am sending string data from Mobile Application to Arduino Due (through HC05). But the data is not receiving at Arduino DUE Serial Monitor.

(note: Some part of data is receiving on Arduino Mega & UNO but due to limitation in memory, i have to use DUE. At DUE data is totally not receiving)

I am using Programming Port of Arduino DUE.

My code is as follows

Code: [Select]


float sens;
String  s;

void setup() {
 
 
 Serial.begin(115200);

}
 
void loop() {
   

 if(Serial.available() > 0){



 sens = Serial.read();
 s=Serial.readString();
 sens=Serial.parseFloat();
 
 Serial.println(s);
 Serial.println();
 Serial.println(sens);



 }

 
}






Please help where i am going wrong. Thanks in advance

ard_newbie


ahmedshah

I removed  sens=Serial.parseFloat();

I want to receive string data only and removed the float part from the code, still not receiving any data.

New code as follows:

Code: [Select]
String  s;

void setup() {
 
 Serial.begin(115200);

}
 
void loop() {
   
 if(Serial.available() > 0)
 
 {
     s=Serial.readString();
     Serial.println(s);
 }
 
}



There is an programmer option in tools>Programmer (Which one should be select here?)
I am currently using ArduinoISP

Go Up