micropython-usermod icon indicating copy to clipboard operation
micropython-usermod copied to clipboard

Module variables

Open IhorNehrutsa opened this issue 5 years ago • 0 comments

First, I want to express my gratitude to the author. Your explanations are clear and their style very benevolent.

And questions: Are module variables possible, like module constants? Module constants https://micropython-usermod.readthedocs.io/en/latest/usermods_06.html

In C code module variables can be declared like

// mymodule
const int some_var;

and then in MicroPython

mymodule.some_var = value
print(mymodule.some_var)

Thanks

IhorNehrutsa avatar Oct 14 '20 09:10 IhorNehrutsa