Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • Please post a snippet of the Arduino side of the code. It should not send data faster than every 50 ms. Commented Dec 3, 2015 at 20:41
  • I edited my post to add the snippet Commented Dec 3, 2015 at 20:45
  • Thanks! You can test this: Reduce the update speed and verify the lag. When you get no lag. Increase the number of samples written. Typically python does not read the serial port directly. It goes through the operating system. There is also buffering going on in the python serial module and on top of that there is the garbage collector. You can help the python side by using a lower update rate but still keep the sample rate on the Arduino side. Commented Dec 3, 2015 at 20:51
  • What serial speed are you using - is 50ms enough time to transmit all the data? If you're using slow serial, maybe just transferring the data is taking too long. Commented Dec 4, 2015 at 0:58
  • Uh... answered over there, copied below. Commented Dec 4, 2015 at 1:41