my code is as it appears in the first post and it happens in the terminal, no matter if write to a file or not.jimmo wrote: ↑Mon Jul 12, 2021 6:49 amIs there anything else particular about your program? Does it only happen when you write to the file?
I think it's unlikely to be power or USB cable issues..
Is there any chance you can capture what the invalid data is? The suggestion in the rpi forum here: https://www.raspberrypi.org/forums/view ... 4#p1885091 (The issue you need to install pyserial -- i.e. pip install pyserial).
it appears frequently (as you can see) but not in every line
and also does the same if you run it in a android device.
can it be defected pico board?