Import of variables from boot.py
Can variables set up in boot.py be accessed from main.py?
Can for e.g. boot.py be used to connect to a wi-fi and set up bluetooth, and then those services used from within main.py to check connectivity, etc.
@robert-hh Hi .. I was woundering if you know how that would work? I want to have the bluetooth to run when i reset the lopy decive....
@robert-hh Brilliant. Thank you for that information.
@robert-hh About your question about WiFI and Bluetooth:
yes, you can set up wifi and bluetooth in Boot.py or main.py and use it then in other scripts. Boot.py and main.py are started by the firmware in the same context one after the other. Besides their names, there is no real difference in what you can do in the scripts. Only you can name in boot.py a different script which will be started instead of main.py.
That's how I would normally, but I've got to the stage where I've written quite a bit and the process of carving it up is a bit fraught.
I'm new to Python but there seems to be some rigour in the way things are done, with terms like 'Pythonic'. I guess I'm trying to adapt to external principals rather than just go about things my normal, hacky way.
I'll create a few small tests and go about discovering.
But in the meantime, I would appreciate knowing if there are any advanced uses of boot.py that anyone has tried.