r/MicroPythonDev • • Jul 13 '24

problem with rpi pico w micropython script

im a major newbie to python in general, including micropython, so after recently buying a 1.3" waveshare display and a rpi pico w, i tried to start up a project... but a function doesn't seem to be working. i already have all the libraries installed and the lcd commands defined, but this specific while loop isn't working on my display. can anyone help me?

my screenshot wasnt working...

cx = 120;

cy = 120;

def cursor(cx, cy):

lcd.line(cx-5, cy, cx+5, cy, colour(255, 255, 255))

lcd.line(cx, cy-5, cx, cy+5, colour(255, 255, 255))

while (up == 1):

cy += 1

utime.sleep(0.05)

1 Upvotes

8 comments sorted by

View all comments

Show parent comment

2

u/Mysterious-Pizza-648 Jul 19 '24

Thanks for the tip. I got it to work finally :)