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 3,430 Dec-22-2024, 10:51 PM
Last Post: PolandoFaker
  Handling receiving updates from user in Telebot mohsenamiri 0 3,560 Aug-26-2024, 09:25 AM
Last Post: mohsenamiri
  How do I stream and record at the same time with arducam? traderjoe 0 1,721 Oct-23-2023, 12:01 AM
Last Post: traderjoe
  EEG stream data with mne and brainfolw PaulC 0 1,360 Aug-22-2023, 03:17 AM
Last Post: PaulC
  Receiving this error in my "response" and causes script to return wrong status cubangt 18 7,859 Aug-13-2023, 12:16 AM
Last Post: cubangt
  SMA (simple moving avg) Not receiving Data (stock prices). gdbengo 2 2,695 Jul-31-2022, 08:20 PM
Last Post: paulyan
  Receiving snmp traps with more than one Community String ilknurg 0 5,155 Jan-19-2022, 09:02 AM
Last Post: ilknurg
  Create RTSP stream from camera? korenron 1 5,332 Jan-04-2022, 10:38 AM
Last Post: Larz60+
  Stream via socket with multiple clients principemestizo 0 3,751 Nov-01-2021, 06:25 PM
Last Post: principemestizo
  Find string between two substrings, in a stream of data xbit 1 3,194 May-09-2021, 03:32 PM
Last Post: bowlofred

Forum Jump:

User Panel Messages

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