My application is getting slower and slower the more I use it. This has been happening since I set up a "feedback" function between my arduino Nano 33 BLE board and my phone.
My application works as follows: I send a value to my card to change its parameters and when the change is made, I send the code back to check the application of the instruction. It can also be information that comes directly from the card.
I also use a button attached to the map to trigger voice recognition. This feature slows down the application even more.
I've read a lot on the forum, but I can't seem to solve my slowness problem: can anyone help me?
I am attaching my 2 programmes. They are a bit complex. I'm not a programmer...
As a general hint, it's better to remove all the components that you don't use any longer.
It could happen that if you haven't deactivated them, they can continue to work without you are being aware.
So, if you don't change the screens, this means that your Screen1 is the unique that works ?
If this is the case, you are still in time to change the structure by using the virtual screens (@Taifun has indicated you the tutorial on that ) .
While doing that, you can add small pieces of code step by step (if possible) so to find if there is a "moment" in which the things are getting worse.
Bonne chance,
Ugo.
The app is extensive. Do you create any long lists in the app? Are you collecting more and more data and the lists are getting longer? Then you analyze ever longer lists?
Since it looks like you're working with BLE, if you're looking to receive information from the device using the notification functionality of BLE, then you ought to declare on the peripheral that it will notify the central (i.e., your app) rather than polling it with a clock. The whole point of the notification protocol is to reduce energy consumption, and actively reading over and over, even if nothing has changed, is the antithesis of this.