Problems with repeating Serial data being recieved


i'm trying receive data serial port, when program run, serial monitor repeats data 3 types between each interval,

below code , screenshot of serial read being repeated , separated few dashes ("-----")

code: [select]

#include <softwareserial.h>

softwareserial myserial(10,11, true); // rx, tx
string indata;
void setup()  
{
 // open serial communications , wait port open:
 serial.begin(9600);

 // set data rate softwareserial port
 myserial.begin(9600);
}



void loop() {
 while (myserial.available() > 0)
 {
   char recieved = myserial.read();
   indata += recieved;  // process message when new line character recieved
   if (recieved == '\n')
   {
     //serial.print("arduino received: ");
     serial.println(indata);
       serial.println ("------------");
     indata = """"; // clear recieved buffer
   }
 }
 delay(800);

}



the serial monitor repeats data 3 types between each interval,

can try sentence again? data sending , expecting say?


Arduino Forum > Using Arduino > Programming Questions > Problems with repeating Serial data being recieved


arduino

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62