[code]
while(Serial.available() > 0){
message_part = Serial.read();
message[message_part_count] = message_part;
message_part_count++;
if (message_part == char(10)){ // only send out message if it's complete (with line feed)
Serial.print(message);
delay(500);
Serial.flush();
reset_message();
} // end if
} // end while
[/code]
">
[code]
while(Serial.available() > 0){
message_part = Serial.read();
message[message_part_count] = message_part;
message_part_count++;
if (message_part == char(10)){ // only send out message if it's complete (with line feed)
Serial.print(message);
delay(500);
Serial.flush();
reset_message();
} // end if
} // end while
[/code]
">
[code]
while(Serial.available() > 0){
message_part = Serial.read();
message[message_part_count] = message_part;
message_part_count++;
if (message_part == char(10)){ // only send out message if it's complete (with line feed)
Serial.print(message);
delay(500);
Serial.flush();
reset_message();
} // end if
} // end while
[/code]
">
[code]
while(Serial.available() > 0){
message_part = Serial.read();
message[message_part_count] = message_part;
message_part_count++;
if (message_part == char(10)){ // only send out message if it's complete (with line feed)
Serial.print(message);
delay(500);
Serial.flush();
reset_message();
} // end if
} // end while
[/code]
JLCPCB – Prototype 10 PCBs for $2 (For Any Color)
China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w