B
B
B1ackGh0st2015-12-29 10:17:22
linux
B1ackGh0st, 2015-12-29 10:17:22

How to clear serial port in linux via python?

Good afternoon
At the very beginning of reading the serial port / dev / ACM0 on which the Arduino hangs, no longer relevant data arrives.
How can I make the serial port clear when I run a python program

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2015-12-29
@Avernial

After opening the port, read everything from it with readall. And then do whatever you want.

M
Max, 2015-12-29
@MaxDukov

I would advise in this case to add a data transfer initialization process, in which the arduina would give data only at the request of the script. Well, start-stop symbols.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question