How do you store data?

I have been creating an app to control a little tank for a project. I need to be able to store data to enable me to store data coming in.

You can store data in the app with TinyDB, or use an external storage: googleSheets, cloudDB, firebase...or others.

Storage (mit.edu)

will this then allow me to compare if the data has changed to then continue onto another function. The code I have works but there is a big delay when any input has changed. Sorry if I am not making any sense this is my first time coding and using the App inventor.

mmm, I'm not sure I understand you...the stored data does not change on its own...you modify it. What exactly do you want to do?

This is my design but so far the there is a big delay between an input and and output on the tank. My tutor said i need to store data to elevate this problem.

Which is the input and the output of the tank? I only see you are sending bytes....which data do you need to store?

we are trying to see for example if the slider position is changed it will compare it to the last known position.

You have the PositionChanged event....that is triggered if changed. If you want to compare with the before position, you can use a variable, to store the position and when it changed compare the variable value with the new position (indicated in thumbPosition in PositionChanged event).

A very simple example. I store the position in a variable and, when it changes, I compare the stored value in the variable with the new one...to determine if it has been moved to the left or to the right. And I store the new position value in the varible, to be able to do the same the next time:

1 Like

oh yes I see now thank you for that I shall give it a go and see how I get on.