It may but probably not enough information.
In most cases like this, I would hope to see some simple sketch that shows the issue. For example, with the code you posted, none of the variables are defined and the like,
so no way to compile it and try it out.
I did try a sub-set of the code with defining some variables, just to see if the parsing code works.
Code:
void setup() {
Serial.begin(115200);
while (!Serial)
;
}
void getDataFromFS2020_V1() {
String temp = "";
if (Serial.available() > 0) {
Serial.readStringUntil('@'); //Look out for first Indicator
int id = Serial.readStringUntil('/').toInt(); //Reads ID
int IDindex = Serial.readStringUntil('=').toInt(); //Reads index
String stringValue = Serial.readStringUntil('$'); //Reads value as String
int intValue = stringValue.toInt(); //Converts value to integer
float floatValue = stringValue.toFloat(); //Converts value to Float
Serial.print("ID:");
Serial.print(id, DEC);
Serial.print(" Index:");
Serial.print(IDindex, DEC);
Serial.print(" String:");
Serial.print(stringValue);
Serial.print(" intVal:");
Serial.print(intValue, DEC);
Serial.print(" float Val:");
Serial.print(floatValue, 2);
Serial.println();
}
}
void loop(){
getDataFromFS2020_V1();
}
You did not provide any sample data that you would expect to receive and what you would expect and what results you saw.
For example, I typed in: @20/30=40$
And the output to serial terminal: ID:20 Index:30 String:40 intVal:40 float Val:40.00
Likewise: @100/2=32.75$
ID:100 Index:2 String:32.75 intVal:32 float Val:32.75
Note: I did this on T4... Could go into my cabinets and find a T3.2, but again not sure what I would be testing for.
From your description, so far all we know is something is not working.
Also know very little about the setup. The T3.2 is plugged into something, and it knows it is there. But not what it is, nor what it is doing or not doing correctly.
What else is the Teensy doing? Are some/all of the IO pins being used to do other stuff?
If it were me, I would probably instrument the code, to see if one can figure out what it is doing or not doing.
Example maybe use Serial1 to output debug messages. Like maybe print out those values like I did and see if that part is working properly. Would hook up a USBToSerial device connected up to pins 0, 1 and connected up to a PC, with terminal program to receive the data. Note: the USB to Serial device could easily be another teensy.
Thing I try (again more less throwing data)
a) Instrument the code like I mentioned, probably incluing also printing out timing information (like millis()... And mabye try same on Mega boards, to get an idea of what is being received and when. Would also instrument the output again to see what iis being sent back and when.
With that compare the outputs of the two boards to see if anything jumps out.
b) In most cases the Teensy runs a whole lot faster than Mega board. So maybe add in some delays between when you receive something and when you reply. Speed wise we are talking both processor speed differences, but also on the Mega after the board receives the USB packet, it then has to send the data to the Atmega2560 board at 115200, So there is for sure a delta time between when the USB data was sent from host, until the processor sees the data, and likewise when you write data back on Serial, the AVR board has to send the data to the communication chip, which then sends a packet back to the host.
So you may need to add in some delays
c) The USB Start up time is slower in the Teensy then the AVR board. In the case of using a Teensy. Serial.begin(115200) the 115200 more or less does nothing, but the begin has built in delays. The Teensy Serial.begin() is optional and added in extra delays to allow the host more time to initialize.
d)...
Hopefully if you do a) you will have some useful information, that can help point toward what the diferences might be.