Quantcast
Viewing all articles
Browse latest Browse all 4507

General discussion • Pico 2 Micropython problem

I've just tried out my new board with a graphics program and have hit a snag. To get this loop to terminate I have to include an 'unnecessary' print statement.

Code:

for i in range(r, 0, -1):    print(i) # <==================== WHY IS THIS NEEDED? ==================    LCD.ellipse(centre_x, centre_y,i+1, i+1,colour(i*5,i*3,i*4), 1)    LCD.show()    time.sleep(0.1)    
If I leave it out the Pico 2 locks up and if I click of the STOP icon I get the message:
Unable to connect to COM3: could not open port 'COM3': PermissionError(13, 'Access is denied.', None, 5)

If you have serial connection to the device from another program, then disconnect it there first.

Process ended with exit code 1.


If I include the print statement it runs through to the following code as expected.

The full code can be found here:
https://pastebin.com/Fmk5iQ18

Statistics: Posted by tonygo2 — Sun Aug 11, 2024 2:48 pm — Replies 2 — Views 79



Viewing all articles
Browse latest Browse all 4507

Trending Articles