Can you process all the serial data at 115200bps with Python?

Asked 2 years ago, Updated 2 years ago, 32 views

Can you process all incoming serial data at 115200bps with Python? I'm converting the C-sweaved sauce to Python, but I keep missing the data I'm putting data in a circular queue and processing it, but the speed of data accumulation is too fast for processing it The queue keeps filling up

This has never happened in C, so is Python impossible?

python c

2022-09-22 20:11

3 Answers

Well, that kind of approach doesn't answer.

Python is definitely a slower language than c, but at 115200 bps, it's only about 14k per second.

There is a profiler called cProfile in Python, so please proceed with the profiling.


2022-09-22 20:11

C is fast. If it takes some time to process, you can also stack incoming data in the queue and process it one by one.


2022-09-22 20:11

The speed at which data is received and stored is not the problem, but the processing of the data seems to be the problem, but there is no right answer;;;;;


2022-09-22 20:11

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.