update .py files via BLE. Asking about ideas.

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
oqs123
Posts: 3
Joined: Mon Aug 03, 2020 4:33 pm

update .py files via BLE. Asking about ideas.

Post by oqs123 » Sun Aug 30, 2020 6:57 pm

I have code freezen in the firmware. I load libraries using import. I want to allow the user to update files .py from the app (BLE) on the phone and saved in flash memory. After uploading the updated file during the next import - the system will import this new file first - calling the import right? If something goes wrong I will give you the option to reset (delete all new files). The question is is this a good idea?

User avatar
jimmo
Posts: 2346
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: update .py files via BLE. Asking about ideas.

Post by jimmo » Thu Sep 03, 2020 5:27 am

Assuming that having the code frozen isn't a requirement for your app to work (i.e. because it would take more RAM to run non-frozen code) then this seems fine.

By having the frozen version as a fallback that seems like a good safety mechanism.

Post Reply