Python Forum
Vpython Delay in plotting points - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Vpython Delay in plotting points (/thread-11895.html)



Vpython Delay in plotting points - SohaibAJ - Jul-30-2018

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