My directory structure on RPi:
/
firmware
__init__.py
functions.py
main.py
__init__.py
is empty, in my main.py, I have:
import firmware
print(current_version)
while functions.py
contains just:
current_version='1.0.0'
When I run, I get the following error:
NameError: name 'current_version' isn't defined
My question is: how can I import functions from files inside the /firmware
directory? I tried all Python ways known to me, including sys.path.add
but to my great disappointment, it failed to work. Is Micropython on RPi Pico special in that way? According to this link, it should work...