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
  Listening on receiving Interface (using scapy) CodyTheCodeNoob 1 2,131 Dec-22-2024, 10:51 PM
Last Post: PolandoFaker
  Handling receiving updates from user in Telebot mohsenamiri 0 1,725 Aug-26-2024, 09:25 AM
Last Post: mohsenamiri
  EEG stream data with mne and brainfolw PaulC 0 1,095 Aug-22-2023, 03:17 AM
Last Post: PaulC
  Receiving this error in my "response" and causes script to return wrong status cubangt 18 6,129 Aug-13-2023, 12:16 AM
Last Post: cubangt
  SMA (simple moving avg) Not receiving Data (stock prices). gdbengo 2 2,276 Jul-31-2022, 08:20 PM
Last Post: paulyan
  Receiving snmp traps with more than one Community String ilknurg 0 3,984 Jan-19-2022, 09:02 AM
Last Post: ilknurg
  Find string between two substrings, in a stream of data xbit 1 2,798 May-09-2021, 03:32 PM
Last Post: bowlofred
  Retrieve data from oscilloscope using pyserial on ubuntu jte350 3 3,879 Apr-29-2021, 04:36 PM
Last Post: jte350
  Decoding a serial stream AKGentile1963 7 13,661 Mar-20-2021, 08:07 PM
Last Post: deanhystad
  Microphone stream manipulation Talking2442 0 4,088 Jan-07-2021, 07:36 PM
Last Post: Talking2442

Forum Jump:

User Panel Messages

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