Python Forum
Receiving large data stream using Pyserial
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Receiving large data stream using Pyserial
#1
I am having a problem where I am streaming binary data from a micro to PC and I want to graph the data. 

The data is binary data coming in around 100 kBits/sec.  So I setup a thread in python to receive the data and I save the last 2 seconds of data to an array. The issue I have ran into is that when I plot the data the receiving thread halts and appears to cause the Pyserial receive buffer to over flow.  That is the threads are not running concurrently. 

I figure I am not the first person to use Python and stream large data real time into python, does anyone have an example of how to do such a thing?

Thanks
Trampas
Reply
#2
You may need to refer to Python's threading topic: https://docs.python.org/2/library/thread...re-example

Avoid the data to be accessed by the receiving thread and plot thread concurrently.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Microphone stream manipulation Talking2442 1 2,717 Nov-19-2023, 02:08 PM
Last Post: palumanic
  EEG stream data with mne and brainfolw PaulC 0 487 Aug-22-2023, 03:17 AM
Last Post: PaulC
  Receiving this error in my "response" and causes script to return wrong status cubangt 18 2,039 Aug-13-2023, 12:16 AM
Last Post: cubangt
  SMA (simple moving avg) Not receiving Data (stock prices). gdbengo 2 1,439 Jul-31-2022, 08:20 PM
Last Post: paulyan
  Receiving snmp traps with more than one Community String ilknurg 0 2,205 Jan-19-2022, 09:02 AM
Last Post: ilknurg
  Find string between two substrings, in a stream of data xbit 1 2,142 May-09-2021, 03:32 PM
Last Post: bowlofred
  Retrieve data from oscilloscope using pyserial on ubuntu jte350 3 2,820 Apr-29-2021, 04:36 PM
Last Post: jte350
  Decoding a serial stream AKGentile1963 7 8,518 Mar-20-2021, 08:07 PM
Last Post: deanhystad
  Looping Through Large Data Sets JoeDainton123 10 4,362 Oct-18-2020, 02:58 PM
Last Post: buran
  Best Video Quality And Stream Harshil 2 2,231 Aug-19-2020, 09:03 AM
Last Post: Harshil

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020