Hello all, I am doing a project with arduino due and a lidar sensor. the point is to collect data in 6 different sections within different angle ranges; however, nothing is printing in my serial plotter and idk what else to do. please help!!
Lidar_Circlej.ino (11.2 KB)
Whenever you want to print a variable out and have it labeled in the plotter, you must separate the variable name and its value with a colon
Serial.print(":"). Then new values to be plotted should be separated from others with a new line. The most obvious issue seems to be that you're not separating what (I'm guessing) are the labels of your data and the actual data:
// Line 152 of your code
Serial.print("RR"); Serial.print(distance); Serial.print(angle); Serial.print(" ");
See how you're printing "RR" and the distance (a float) right next to each other? In the Serial console you should see
RR[float value distance], which isn't a number (and thus can't be printed on the serial console).
thank you for replying! so i should just print a colon in between the name and distance for each of the six sections? last night i got the serial plotter working but it was printing out data of all six sections on one line when i would like each section to have its individual plot on the same graph, do you know if that is possible?
Yes. Try separating the label and its value with a colon, and then going to a new line for a new label/value pair:
im confused though because im not printing out just a value i want to print out angle vs distance for each one
Oh! So you want completely separate graphs? Arduino plotter can't do that; it can only have one graph with multiple lines.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.