Python Forum

Full Version: Vpython Delay in plotting points
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I am trying to make a 2D 360degree LiDAR using the Garmin LiDAR Lite module and want to do all the mapping on Raspberry Pi. For this I used an Arduino Nano to measure distance using the LiDAR and then send it to Pi. Then using Pi I want to plot the distance points corresponding to the angle using Vpython. The problem I am facing is that Vpython takes a lot of time, about 2 minutes, to plot the distance points once I physically change the distance. I ran a test code to see how much delay there was between the arduino and pi but the changes were almost instantaneous. But as soon as I start plotting it in vpython the points take a lot of time to plot. I set a delay so the Vpython window has time to load but that just takes 5 seconds and after that the placeholder is shown without any data points.

Is there some way to reduce the delay between the change in distance in real world and the plotting of points in vpython?

Regards,
Sohaib AJ