Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7521

MicroPython • Re: Problem with NEXION HMIs with Micropython on an RP2040

$
0
0
in the module nex.py, you should create a variable
ok = False # possibly a good initializer value

In the main code,

Code:

...       while True:        nex.ok = False        nex.nex_return()        if nex.ok:         # nex.ok=False # for which purpose ?     ...     
But better to use a return value instead of a global variable.
Just use

Code:

...     ok=True     return ok  # no break needed; perhaps use return True here instead...
and on the place where you call this:
ok = nex.nex_return()

Statistics: Posted by ghp — Thu Jul 03, 2025 3:17 pm



Viewing all articles
Browse latest Browse all 7521

Trending Articles