Hello, I am trying to take a given angle and distance from a lidar module and plot them on a cartesian plane. I can convert degrees and distance to x,y with simple math, but I don't know where i could do this. I thought of the serial plotter but that is a live plotter, not quite a cartesian plane. is there a library I could use for this?
Your post was MOVED to its current location as it is more suitable.
Could you also take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.
Thank you
Okay, thank you. I am using my phone so it's hard to navigate through the website.
Where exactly do you want this cartesian plane to be? You are correct in that the Serial plotter is just a running graph. You can either use Serial Monitor to capture all the data and then import it into Excel or similar. Or, you could install some sort of OLED or TFT display and generate the plot yourself.
What are some examples of these values? What are you asking? What do you mean"where can I do this?"?
I wanted to be able to do this within the arduino ide. I didn't know if there was a library that I could do this with within the arduino ide
I want to be able to take the values given by the lidar module(r, theta) and visually see these values actively so I can see how accurate the lidar module is. I want to be able to do this within the Arduino IDE. I can do this with an integration between python and Arduino, but I wanted to keep it isolated to just Arduino, if not that's okay, I just wanted to know if it would be able to be any simpler is all.
Pretty simple. Start here: Polar and Cartesian Coordinates
A couple of lines of Arduino code will do the conversion either way.
Looks like you will have to write your own program for the desktop computer that receives, perhaps over serial communication, values to plot or orders to draw lines or whatever.
I’d like a copy of that (Mac OSX version, please) when you have it ready.
TIA
a7
That's not what I was asking for, I know how to do a simple conversion between polar and cartesian coordinate systems. If you refer to my original question, I am asking how to plot them on a non-moving cartesian plane...
I am currently developing it in python, I am not familiar with Mac OSX, but if you can run python scripts, I'll send you the code.
Please explain how you would plot anything on a "non-moving cartesian plane".
Most plot programs and graphics libraries have a function call similar to "plot(x,y)".
What device will display the result? Post links.
2D plotting is not a feature of the Arduino IDE. You will either need a graphics display on the Arduino itself or a program on the PC/Mac to accept data from the Arduino and do the plotting on the PC/Mac.
I would plot them on a window on my laptop that my Arduino is connected to
What program will you be using to plot them in a window on your laptop?
How will you transmit the data to that program? A serial connection, internet connection or SD card are among the many possibilities.
Well...I wanted to do it through Arduino, but there don't seem to be any libraries. I am receiving the data from a lidar module being used for mapping.
I am using a serial connection. I have a python program now plotting it, but I want it to be condensed to just arduino, so I wanted to know if there was a plotting library within arduino that is used for plotting on a cartesian plane.
The Arduino IDE contains a serial plot program, but it cannot plot Cartesian coordinates, only time series.
Whatever you choose has to be a program that runs independently on the laptop.
i know..... Please read my original post... I am asking if there is a way to pull up a cartesian plane within arduino... I know about the serial plotter. I am asking if there is a library that can be used for graphing not with a function of time
NO.
I read your original post, and it is incomprehensible.
There is... it's called plotter. Thank you for your help tho