pin-init in main; no knows in subroutines?
Posted: Wed Nov 11, 2020 4:56 pm
Hello,
I've in the main progamm a pin initialized as output and it works. Then I did make subroutines and put this in another files for a better overview. The file I integrated wirth import. The Call of the subroutines takes place after the pin initialization.
But MicroPython shows me an error than the subroutines don't knows the pin definition. I did try continue: In the subroutines file nothing imports and nothing definitions are known.
How can I pass on the imports and definitions?
I've in the main progamm a pin initialized as output and it works. Then I did make subroutines and put this in another files for a better overview. The file I integrated wirth import. The Call of the subroutines takes place after the pin initialization.
But MicroPython shows me an error than the subroutines don't knows the pin definition. I did try continue: In the subroutines file nothing imports and nothing definitions are known.
How can I pass on the imports and definitions?