I wish to redirect the operation of the Python print statement. I came across an article in the documentation showing me how to redirect to either SER or USB0. When I reassign sys.stdout and sys,stderr my basic app seems to 'hang'. Commenting out the reassignment statements the code runs as expected. A copy of he code is shown attached:
The PORTCFG value is 0.
Eventually, I want to use USB0, but I get a similar result as with the SER. Could anyone advise,