Are there any known issues with serial comms & the Picam module?

When I have a serial channel open (over USB) & write to it whilst viewing the input from a Picam on screen, the view port will freeze after about 10 seconds.

Using the same program with the serial writes commented out & eveything behaves.

Edit dont forget to flush your serial out buffer!

  • "Using the same program ...", what program?
    – Ingo
    May 11, 2019 at 9:43
  • @Ingo its was a simple video capture program, problem solved now
    – DrBwts
    May 11, 2019 at 13:16
  • 1
    Could you please write an answer and explain in short what's the solution? This would finish your question and no one tries to help you (for nothing ;).
    – Ingo
    May 11, 2019 at 19:40

1 Answer 1


The problem stemmed from an overflow in the serial buffer. Previously I had been using a web cam via the USB which must have been clearing the buffer under the hood so to speak, which was why I wasnt encountering the issue.

The Picam on the other hand has nothing to do with the USB hub, so the automatic buffer flushing wasnt taking place. I included s1.flushInput() after every batch of serial writes in my loops (where s1 = serial.Serial(port, rate)) and this solved the problem.

  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.
    – Ingo
    Feb 17, 2020 at 22:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.