Conflict Serial Communication

Hey guys i ran into some very odd problem today, i say odd because this was working two days ago perfectly but now it seems there’s a conflict problem

Im using this code to split an incoming string in two, the division of the string will be determined by the “;”

#include "FPS_GT511C3.h"
#include "SoftwareSerial.h"






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

}
void loop()
{

  char instrucao[10];            // size as needed
  char code[5];   
  char nmbr[5];
  char *index;
  
  int charsRead;
  
 
   while (true)
   {
    if (Serial.available() > 0) {
      charsRead = Serial.readBytesUntil('\n', instrucao, sizeof(instrucao ) - 1);
      instrucao[charsRead] = '\0';  

      Serial. print("instrucao = ");    
      Serial.println(instrucao);    

      index = strchr(instrucao, ';');
      *index = '\0';                             

      strcpy(code, instrucao);
      strcpy(nmbr, index + 1);

      Serial.print("code = ");             
      Serial.println(code);
      Serial. print("nmbr = ");
      Serial.println(nmbr); 
      break;
      
    }
   }
  }

Using this code i get the following result ( attachment below )

but after adding this line of code: “FPS_GT511C3 fps(4, 5);” - setting the communication pins for the GT511C3 fingerprint sensor on the arduino.
This is part of a library made by Josh Hawley.

that’s why i have to use

#include "FPS_GT511C3.h"
#include "SoftwareSerial.h"

or else i won’t be able to control the sensor

after addingFPS_GT511C3 fps(4, 5)

the serial com doesn’t show anything anymore, it doesn’t split the string or anything. i remove that single line and it works perfectly, any ideas?

str.png

I think you have only posted the program that works. Please also, and separately, post the complete program that is causing the problem.

...R

Robin2: I think you have only posted the program that works. Please also, and separately, post the complete program that is causing the problem.

...R

That was the whole program code sir, it reads incoming string and splits it, thats all there is! the program didnt work correctly after adding that one line of code i posted above

But anyway i later found out that i had short circuited pins 4 and 5, that was causing the program to fail. all good now, sorry for wasting your time

Giovanniroberts:
That was the whole program code sir, it reads incoming string and splits it, thats all there is! the program didnt work correctly after adding that one line of code i posted above

I am glad you have figured it out.

I was asking you to post the version of the code including the line that you added so that we would know exactly where you added it.

…R