Import of variables from boot.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.
Thanks.
But in the meantime, I would appreciate knowing if there are any advanced uses of boot.py that anyone has tried. -
@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. -
@robert-hh Brilliant. Thank you for that information.
-
@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....
-
-
We found indeed the behaviour that instances created in boot.py also work in main.py without recreating the instances. That works e.g. if you use it standalone witout atom connected, but as soon as as atom is connected it starts to complain an instance which was created in boot.py does not exist in main.py when called.
Any idea why?
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
