Handling data comunicated between 2 arduinos over serial

Sorry for the long write up but this is 3 fairly big programs in 2 different languages communicating between 2 bespoke boards a computer and an oscilloscope. I have made 2 PCBs using the Atmega328p-au. One is the master that switches outputs off and on and monitors inputs, the other is the slave, it’s a keypad with 5 LEDs and a buzzer. The master has a USB that I can serial monitor, I have also made a program in python that switches outputs, monitors inputs. Each unit has a number. I need all 3 communicating over serial. The Python program and the master work together beautifully.

So the master sends a string to serial that says I am [0], I want an answer from [1], all 5 out puts are off [00000] all my inputs are off [00000], alarm is off[0], end of message [9]

so the master sends:

Serial.print(iAm);
  Serial.print("/");
  Serial.print(RSVP);
  Serial.print("/");
  Serial.print(data[1]);
  Serial.print("/");
  Serial.print(data[2]);
  Serial.print("/");
  Serial.print(data[3]);
  Serial.print("/");
  Serial.print(data[4]);
  Serial.print("/");
  Serial.print(data[5]);
  Serial.print("/");
  Serial.print(data[6]);
  Serial.print("/");
  Serial.print(data[7]);
  Serial.print("/");
  Serial.print(data[8]);
  Serial.print("/");
  Serial.print(data[9]);
  Serial.print("/");
  Serial.print(data[10]);
  Serial.print("/");
  Serial.print(Alarm);
  Serial.print("/");
  Serial.println("9"); // EOL

0/1/0/0/0/0/0/0/0/0/0/0/0/0/9\n

It works great, I can serial monitor through Arduino IDE and through my python program no problem on the master board. My keypad has no USB chip, I spent several days trying to figure out what was going wrong using 5 LEDs and a buzzer to work out where my code failed. I tried tristating an Arduino Uno to act as a serial bridge but its not working for some reason. I now have an oscilloscope hooked up to TX and RX to see what is being said between my master and keypad, that sends its data to the computer where I can decode one string at a time (yeah its been real fun).

Keypad code to read serial:

  while (Serial.available()) {
    // get the new byte:
    char inChar = (char)Serial.read();

    // add it to the inputString:
    inputString += inChar;

    // if the incoming character is a 9, set a flag so the main loop can
    // do something about it:
    if (inChar == 9 ) {
      stringComplete = true;
      digitalWrite(led1, HIGH);
      
      
    }
  }

The 9 in that if statement has been at various times been 9 (my end of line signal), 57 (9 in ascii), \n, 13, CR (all trying to pick up the carriage return), 10,LF,\r (trying to pick up the line feed) and 8 (just to prove that if inChar == 9 is actually working, it is ie. the program stops if I tell it to look for an 8, but moves past this stage when I pick up on a 9 of carriage return).

This is where my problem occurs:

  if (stringComplete)  {
    digitalWrite(led2, HIGH);
    frm = inputString.charAt(0);
    rsvp = inputString.charAt(1);
    out1 = inputString.charAt(2);
    out2 = inputString.charAt(3);
    out3 = inputString.charAt(4);
    out4 = inputString.charAt(5);
    out5 = inputString.charAt(6);
    test14 = inputString.charAt(14);
    Serial.print(inputString);
    delay(1000); //allows me to view a single string of the data on the scope
    inputString = "";
    stringComplete = false;
}

so If you receive a complete string of data ending in a 9, turn on an LED to show you have made it this far, then print that string, clear the string, and set the string complete flag to false ready for the next string

The string that is printed looks like this:
0/0/0/0/0/0/9\n CR LF 0/1/0/0/0/0/0/0/
but the start and end point of the string seems to move around so my data is all over the place.

So I thought I told the program to only move on to this stage if the string ends in 9, the string dosn’t end in 9 and it seems to have carried on regardless.

also I cant delay my master board to slow things down I can only send it on another loop of the program as parts of the program are safety critical and cant just be left un-monitored. I can only delay the keypad.

post the receive code

consider using readBytesUntil()

consider how the code discriminates between data that looks like you message terminator or start chars

consider how the code would resynchronize

Its getting messy as i have been commenting out bits trying to clear this fault, checksums are no longer used in this variant stuff like that but this is the full code:


//set up capacitive sensors
CapacitiveSensor   cs_2_1 = CapacitiveSensor(2, 9);       // 5M resistor between pins 2 & 9, pin 2 is sensor pin, add a wire and or foil if desired
CapacitiveSensor   cs_2_2 = CapacitiveSensor(2, 11);      // 5M resistor between pins 2 & 11, pin 6 is sensor pin, add a wire and or foil
CapacitiveSensor   cs_2_3 = CapacitiveSensor(2, 13);      // 5M resistor between pins 2 & 13, pin 8 is sensor pin, add a wire and or foil
CapacitiveSensor   cs_2_4 = CapacitiveSensor(2, 15);      // 5M resistor between pins 2 & 15, pin 8 is sensor pin, add a wire and or foil
CapacitiveSensor   cs_2_5 = CapacitiveSensor(2, 17);      // 5M resistor between pins 2 & 17, pin 8 is sensor pin, add a wire and or foil
CapacitiveSensor   cs_2_6 = CapacitiveSensor(2, 8);       // 5M resistor between pins 2 & 8, pin 8 is sensor pin, add a wire and or foil
CapacitiveSensor   cs_2_7 = CapacitiveSensor(2, 7);       // 5M resistor between pins 2 & 7, pin 8 is sensor pin, add a wire and or foil
CapacitiveSensor   cs_2_8 = CapacitiveSensor(2, 6);       // 5M resistor between pins 2 & 6, pin 8 is sensor pin, add a wire and or foil

//set button flags
bool But1Call = 0;
bool But2Call = 0;
bool But3Call = 0;
bool But4Call = 0;
bool But5Call = 0;
bool But6Call = 0;
bool But7Call = 0;
bool But8Call = 0;

//name outputs
int led1 = 10;
int led2 = 12;
int led3 = 14;
int led4 = 16;
int led5 = 18;
int buzz = 5;
int note = 3000;   // buzzer tone
int splashDelay = 200;

String inputString = "";         // a String to hold incoming data
bool stringComplete = false;  // whether the string is complete

//#############################################my data########################################
int iAm = 3;                                    //this is device number 2 (0 = master 1 = computer p = eprom program incoming from computer)
float checkSum = 0.00;                          //check sum to send as serial
float voltage = 0.00;                           //system voltage
int data[20] {0, 0, 0, 0, 0, 0, 0, 0, 0};       //keypad output call

//#############################################data from master################################
int frm = 0;
int rsvp = 0;                                   //response requested from unit
int out1 = 0;                                   //output states from master
int out2 = 0;                                   //output states from master
int out3 = 0;                                   //output states from master
int out4 = 0;                                   //output states from master
int out5 = 0;                                   //output states from master
int alarm = 0;                                  //alarm state
int test14 = 0;
String VString = "";                            //master voltage
String ChecksumString = "";                     //master checksum
float VFloat = 0;
float ChecksumFloat = 0;
float checkSumCalc = 0;


void setup()
{
   Serial.begin(9600);         //initialize serial 

  inputString.reserve(200);    // reserve 200 bytes for the inputString:

  
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(led3, OUTPUT);
  pinMode(led4, OUTPUT);
  pinMode(led5, OUTPUT);

  //####################################splash#############################
  
  digitalWrite(led1, HIGH);
  tone(buzz,1000);
  delay(splashDelay);
  digitalWrite(led2, HIGH);
  tone(buzz,2000);
  delay(splashDelay);
  digitalWrite(led3, HIGH);
  tone(buzz,3000);
  delay(splashDelay);
  digitalWrite(led4, HIGH);
  tone(buzz,4000);
  delay(splashDelay);
  digitalWrite(led5, HIGH);
  tone(buzz,5000);
  delay(splashDelay);
  digitalWrite(led5, LOW);
  tone(buzz,4000);
  delay(splashDelay);
  digitalWrite(led4, LOW);
  tone(buzz,3000);
  delay(splashDelay);
  digitalWrite(led3, LOW);
  tone(buzz,200);
  delay(splashDelay);
  digitalWrite(led2, LOW);
  tone(buzz,1000);
  delay(splashDelay);
  digitalWrite(led1, LOW);
  noTone(buzz);
  delay(splashDelay);

}

void loop()
{

  long start = millis();
  long total1 =  cs_2_1.capacitiveSensor(30);
  long total2 =  cs_2_2.capacitiveSensor(30);
  long total3 =  cs_2_3.capacitiveSensor(30);
  long total4 =  cs_2_4.capacitiveSensor(30);
  long total5 =  cs_2_5.capacitiveSensor(30);
  long total6 =  cs_2_6.capacitiveSensor(30);
  long total7 =  cs_2_7.capacitiveSensor(30);
  long total8 =  cs_2_8.capacitiveSensor(30);


//##################################SET FLAGS#################
//Button 1 flag set
  if (total1 > "4000") {
    if (But1Call == 0){
    But1Call = 1;
    }
    else {
    But1Call = 0;
    }
    
  }
  else {
    But1Call = 0;
  }

//Button 2 flag set
  if (total2 > "4000") {
    if (But2Call == 0){
    But2Call = 1;
    }
  }
  else {
    But2Call = 0;
  }

//Button 3 flag set
  if (total3 > "4000") {
    if (But3Call == 0){
    But3Call = 1;
    }
  }
  else {
    But3Call = 0;
  }

//Button 4 flag set
  if (total4 > "4000") {
    if (But4Call == 0){
    But4Call = 1;
    }
  }
  else {
    But4Call = 0;
  }

//Button 5 flag set 
  if (total5 > "4000") {
    if (But5Call == 0){
    But5Call = 1;
    }
  }
  else {
    But5Call = 0;
  }

//Button 6 flag set
  if (total6 > "4000") {
    if (But6Call == 0){
    But1Call = 0;   // board fault button 6 triggers button 1 
    But6Call = 1;  
    }
  }
  else {
    But6Call = 0;
  }

//Button 7 flag set
  if (total7 > "4000") {
    if (But7Call == 0){
    But7Call = 1;
    }
  }
  else {
    But7Call = 0;
  }

//Button 8 flag set
  if (total8 > "4000") {
    if (But8Call == 0){
    But8Call = 1;
    }
  }
  else {
    But8Call = 0;
  }

//######################################Flag actions######################
  if (But1Call == 1) {
    data[1] = 1 ;   
    tone(buzz,note);
  }


  if (But2Call == 1) {
    data[2] = 1 ;
    tone(buzz,note);
  }


  if (But3Call == 1) {
    data[3] = 1 ;
    tone(buzz,note);
  }
   
  
  if (But4Call == 1) {
    data[4] = 1 ;
    tone(buzz,note);
  }
   
  
  if (But5Call == 1) {
    data[5] = 1 ;
    tone(buzz,note);
  }

  
  if (But6Call == 1) {
    data[6] = 1 ;
    tone(buzz,note);
  }
   
  
  if (But7Call == 1) {

    data[7] = 1 ;
    tone(buzz,note);
  }

  
  if (But8Call == 1) {

     data[8] = 1 ;
     tone(buzz,note);
  }


   //##################################if data recieved decode############################################
   //string from master = frm,rsvp,out1,out2,out3,out4,out5,in1,in2,in3,in4,in5,alarm
  if (stringComplete)  {
    digitalWrite(led2, HIGH);
    frm = inputString.charAt(0);
    rsvp = inputString.charAt(1);
    out1 = inputString.charAt(2);
    out2 = inputString.charAt(3);
    out3 = inputString.charAt(4);
    out4 = inputString.charAt(5);
    out5 = inputString.charAt(6);
    test14 = inputString.charAt(14);
    Serial.print(inputString);
    
    inputString = "";
    stringComplete = false;
    //if (test14== '9'){
     // digitalWrite(led2, HIGH);
    //}
    //alarm = inputString.charAt(6);

    //VString = inputString.charAt(7);
    //VString = VString + inputString.charAt(8);
    //VString = VString + inputString.charAt(9);
    //VString = VString + inputString.charAt(10);
    //VString = VString + inputString.charAt(11);
    
//    frm = frm - 47;
//    rsvp = rsvp - 47;
//    out1 = out1 - 47;
//    out2 = out2 - 47;
//    out3 = out3 - 47;
//    out4 = out4 - 47;
//    out5 = out5 - 47;
    
//    Serial.print(rsvp);
     // clear the string:
        inputString = "";
        stringComplete = false;
    
    //alarm = alarm -48;



//    if (checkSumCalc > ChecksumFloat - 1 and checkSumCalc < ChecksumFloat + 1 ) {
//      checkSumCalc = 0;
//      ChecksumFloat = 0;
      if (frm == 0){
                
      
//        if (out1 == 1) {
//          digitalWrite(led1, HIGH);
//        }
//        else{ digitalWrite(led1, LOW);
//        }
//      
//        if (out2 == 1) {
//          digitalWrite(led2, HIGH);
//        }
//        else{ digitalWrite(led2, LOW);
//        }
//        
//        if (out3 == 1) {
//          digitalWrite(led3, HIGH);
//        }
//        else{ digitalWrite(led3, LOW);
//        }
//        
//        if (out4 == 1) {
//          digitalWrite(led4, HIGH);
//        }
//        else{ digitalWrite(led4, LOW);
//        }
//        
//        if (out5 == 1) {
//          digitalWrite(led5, HIGH);
//        }
//        else{ digitalWrite(led5, LOW);
//      }
      
//      if (alarm == 1) {
//        tone(buzz, note);
//        if (note >= 4000){
//          note = 500;
//        }
//        else{
//        note=note+500;
//        }
//        
//      }
//      else{ noTone(buzz);
//      }

      
      if (rsvp == iAm) {
        
//          int InVoltage = analogRead(6);    //INPUT VOLTAGE VALUE
//  float voltage = InVoltage * (5.0/1023.0);
//  voltage =voltage * 10; //voltage must be 2 digit)
//        checkSum = voltage * (iAm + data[0] + data[1] + data[2] + data[3] + data[4] + data[5] + data[6] + data[7] + data[8] + data[9]);
        digitalWrite(led3, HIGH);
        Serial.print(iAm);
        Serial.print(data[1]);
        Serial.print(data[2]);
        Serial.print(data[3]);
        Serial.print(data[4]);
        Serial.print(data[5]);
        Serial.print(data[6]);
        Serial.print(data[7]);
        Serial.print(data[8]);
        Serial.print(data[9]);
        //Serial.print(voltage);
        //Serial.println(checkSum);
        noTone(buzz);
        
      }
        // clear the string:
        inputString = "";
        stringComplete = false;
      
    }
        
    else {
      inputString = "";
      rsvp = "";
      //rsvp1 = "";
      stringComplete = false;
    }
  }
}


void serialEvent() {
  while (Serial.available()) {
    // get the new byte:
    char inChar = (char)Serial.read();
    // add it to the inputString:
    
    inputString += inChar;
    // if the incoming character is a newline, set a flag so the main loop can
    // do something about it:
    
    if (inChar == 13 ) {
      stringComplete = true;
      digitalWrite(led1, HIGH);
      
      
    }
  }






  
}```

The code you posted has the 9 check commented out and even if it weren't the led2 is set high the instant the stringComplete variable is true.

The 9 check is a 13 (carriage return) check right at the bottom. The commented out one was only put in and commented out as part of the faultfinding. LED 1 goes high as soon as i get a complete message, LED2 goes high when the if stringcomplete = true loop runs. LED3 goes high when the program realises its being asked to respond. The LEDs are just for fault finding at the moment as its hard to serial monitor this board.

One possible problem is in serialEvent - you read everything available. I would expect that once you see a 13, it should stop reading and let the main code deal with what was received.

I think I understand, I was wondering if my void serialEvent loop was running in parallel to the main loop. That would mean that my input string was still being written to whilst my main loop was running after the string complete flag was raised and before the main loop had reached the bit where it actually has to process the code. I ruled it out on the basis that void loops dont run in parallel so I assume the main loop would run immediately after and be followed by to serial event. If the two loops were threaded together though that could explain it. Maybe if as soon as I receive my end of line character I transfer my inputString to another variable to work with?

No. The main program that the IDE provides calls them separately - that processor doesn't multitask. Most folk here don't use serialEvent - there's less control.

What do you recommend? my IDE (1.8.15) gives this method as the example>communication>serial event.
Also i just tried putting this

      inputString1 = inputString;
      stringComplete = true;

and printing inputstring1 same result. im out of ideas now, i have all the data so even if there's a way to split a string around a character and append the front on to the back maybe just to bodge it in to working.

Just tried this exact same result, i'm receiving the data but its like the end of the last string is hanging around still, or the end of my new string is added to the front.

void serialEvent() {
  while (Serial.available()) {
    char readData[28]="0000000000000000000000000000";//The character array is used as buffer to read into.
    int x = Serial.readBytesUntil("9",readData,28);//It require two things, variable name to read into, number of bytes to read.
    //Serial.println(x);//display number of character received in readData variable.
    Serial.print(readData);//send back the 10 bytes of data.
    digitalWrite(led3, HIGH);
    delay(1000);

That while should probably be an if now.

Also, wrong quotes around the 9. Use single quotes instead - didn't the compiler complain?

Why use the SerialEvent() function ?

It provides no functionality that you cannot program yourself and if you start it with a test to see if Serial data is available then you might just as well put the while loop directly in the loop() function

consider the output and program below

1234
  1 0x31, 0x01
  2 0x32, 0x02
  3 0x33, 0x03
  4 0x34, 0x04
abcd
  a 0x61, 0x31
  b 0x62, 0x32
  c 0x63, 0x33
  d 0x64, 0x34

char rxBuf [80];
char s [80];

void
processInput (
    char  *buf,
    int    nByte )
{
    Serial.println (buf);
    for (int n = 0; n < nByte; n++)  {
        char c = buf [n];
        sprintf (s, "  %c 0x%02x, 0x%02x", c, c, c - '0');
        Serial.println (s);
    }
}

// -----------------------------------------------------------------------------
void loop()
{
    if (Serial.available ()) {
        int n = Serial.readBytesUntil ('\r', rxBuf, sizeof(rxBuf));
        rxBuf [n] = '\0';

        processInput (rxBuf, n);
    }
}

// -----------------------------------------------------------------------------
void setup()
{
    Serial.begin (9600);

}

Compiler didn't complain I'm on Linux and using an ICSP programmer don't know if that makes any difference. I'm still really struggling, Data now appears to be in the correct position more or less, (its hard to tell) however it seems to be corrupted. Wasn't sure if I had something weird happening with my scope decoding. So I now have my keypad receiving data as you said then sending that back to the master, the master then sends the word "received" followed by the string it has received from the keypad. The Linux terminal displays all the data received over serial when my python program is running, that threw up a fault saying "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xeb in position 11: invalid continuation byte" so i ran it in arduino's serial monitor, this is what I'm getting back from the controller:
recieved0/000000000000000000000000⸮6⸮⸮⸮⸮
recieved/0/0/0/0/0/0/0//0/⸮6⸮⸮⸮⸮
recieved/0/0/0/0/0/000000000000000⸮6⸮⸮⸮⸮
recieved/0/0/000⸮6⸮⸮⸮⸮
recieved/1/0/0/0/0/0/0/0/00⸮6⸮⸮⸮⸮
It actually displays differently in the serial monitor showing 2 square shaped characters in every string so each string ends "square ? square 6 ????"
I'm assuming that when "000000" is displayed without the forward slash separating them that means no data has been received and is still showing 0 from this bit of code:

char readData[28]="0000000000000000000000000000";//The character

My keypad - master serial connection, is about 200mm of cat 5 Tx - ground pair, Rx - ground pair, 12v feed to the keypad - ground pair, the final twisted pair is unconnected. Maybe an issue with my PCB? It seems weird that the first bit of each string is fine, and the weird charicters seem to regular to be interference to me.

Its twisting my melon man.

is that an ASCII char? should it be?

are the bit rates the same?

TBH i'm working at the very limit of my knowledge and struggling to keep up at the moment i dont think i have the intelligence to keep up with responses im getting to this. If it helps the serial monitor is showing other information i just picked out the relevant bits. my master is constantly sending its condition and asking for a response from both the python program and the keypad (and another device that don't yet exist) so RSVP is changing from 1-3. The keypad is responding once/ second by sending the last string back to the master, so the master can then send that to serial monitor. So it actually looks like this:
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
recieved0/0/0//0/0/0/0/0/0/0/0/0/0⸮6

0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
recieved/0000000000000000000000000⸮6

0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
0/3/0/0/0/0/0/0/0/0/0/0/0/9
0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9
recieved
0/1/0/0
0/3/0/0/0/1/0/0/0/0/0/0/0/9
recieved/0000000000000000⸮6

0/1/0/0/0/0/0/0/0/0/0/0/0/9
0/2/0/0/0/0/0/0/0/0/0/0/0/9

So I am sending good data from the master, I think it has to be receiving that, because it recognises the end character. baud rate on master, keypad, serial monitor and python program all set to 9600. I googled 0xeb and its not something i have sent so that makes me think something gone wrong, but i have no idea what or where.

Weeks i have been trying to figure this out. There was an extra 0 on my RX pull up resistor. I need a beer.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.