Sling wrote: ↑
Sun Apr 04, 2021 12:35 am
Is your power supply noisy. Intermittent behaviour could easily be noisy power.
It's an interesting one Tony,
The main USB serial /comm hardware / session level in USB is self error checking and so is the data passing over the connection - But if the data at the arduino level PRIOR to the commport is being corrupted then it will still error check correctly as per the old garbage in garbage out adage. An example being a corruption at arduino hardware level prior due to the processor passing data to the usb serial converter on the arduino would error check correctly when passed over USB. - again, garbage in garbage out.
Interestingly I did
once have an issue with a specific arduino that caused a similar issue though. !
It is the ONLY arduino I have ever had fail, and it was a store bought trademarked one !!!
I was using it with a TM1638 as a test of one of the board modules with the buttons and 8 digit displays. It would occasionally simply stop working - the display would freeze - without a disconnect at the hardware commport level, although, it would then fail to flash also (but still be recognised via the arduino IDE as a device) which was a definite sign of data issue although not necessarily at the physical USB serial level as it never caused a physical disconnect - garbage in garbage out - or indeed, correct data from the arduino IDE yet being corrupted at the arduino processor end at serial port level on the arduino processor after the USB Serial IC. (An FTDI which was far mor tolerant than the processor.
This was traced to the on board 5V regulator on the Arduino as I was using an external supply for both arduino and the Module.
The power on LED would start to flicker and the issue would happen. It would be hit and miss, and disconnecting the PSU and reconnecting would tend to make it ok for a short while but could stop at any point. Eventually it became constant. I believe it was the standard AMS1117 reg but cant remember.
A good test might be to run the bare minimum simplest message_port sketch and see what happens on the original hardware ?. If still present use a different arduino on a short cable with nothing connected, Of course, it would also help to try the arduino on USB power only if load can be taken off of it as Detlef mentioned.