Just had a chance to try the same code but with a 5V2A power supply and this seems to have solved the issue.
Thanks for all the help.
1 Like
Good news! Glad you’ve found the source of the problem :-)