you cannot mix normal text output and plot data when attempting to plot - the text corrupts the plot
comment out the serial.print() statements such as "RFID = XXXXX"
just transmit numeric data to be plotted,
e.g. Serial.print(X); Serial.print(' ');Serial.println(Y);
/*
* Created by ArduinoGetStarted.com
*
* This example code is in the public domain
*
* Tutorial page: https://arduinogetstarted.com/tutorials/arduino-serial-plotter
*/
void setup() {
Serial.begin(115200);
}
void loop() {
for(int i = 0; i < 360; i += 5) {
float y1 = 1 * sin(i * M_PI / 180);
float y2 = 2 * sin((i + 90)* M_PI / 180);
float y3 = 5 * sin((i + 180)* M_PI / 180);
Serial.print(y1);
Serial.print("\t"); // a space ' ' or tab '\t' character is printed between the two values.
Serial.print(y2);
Serial.print("\t"); // a space ' ' or tab '\t' character is printed between the two values.
Serial.println(y3); // the last value is followed by a carriage return and a newline characters.
delay(1);
}
}
Carefully read every post in this forum topic again. Make sure to try the example sketch horace shared on your own Arduino board to prove to yourself that you can use Serial Plotter with a sketch that produces output in the correct format.
Carefully read the documentation page DaveX linked. Make sure to try the example sketches that are shared there.
Use what you learned from reading those things to make your best attempt at correcting your own sketch.
After that, if you still have any questions or problems, come back here with the following things:
Your updated sketch
A detailed description of any specific problems or questions you might have
I tried to upload your code in my Arduino it works the serial plotter display the sine wave . But Im having trouble displaying my output signal using RFID
with the byte0...byte3 legend labels. But if you mix in lines with different formats, it will confuse the plotter.
Your graph shows a mix of odd legend text and three square wave looking traces. I guess that if you looked at the Serial.print(...) output in the Serial Monitor, you'd have a mix of line formats. Maybe a header line with the strings in the legend, then some alternating 3-value lines with what shows up on the plot .