Hi I have been stuck on this for a couple of days. I want to compare incoming data to already stored data and if it is different, update the database and then display the saved data.
The blocks I have work fine for one piece of data but as soon as I add another it breaks somehow.
I believe it is something to do with the clock timer, because the value will stay on screen if it's just one piece of data but as soon as I add another it only stays on the screen for the period I have set the timer.
I can receive and display data from arduino no problems, just comparing and saving giving me problems
That works for the one value but as soon as I call compare_to_database in the second if/then it's the same problem. I also tried moving the compare_to_database outside the if/thens that replace the text and outside the receive bytes but that returns nothing.
Yep, just blank in the text field.
If i call compare_to_database in each if/then the text is displayed but only for the length of the timer.
If i change the length of the timer the data is displayed for that length.
Delimiter is 10.
Thanks for making me look at the code again though, I was using \n to separate the values but that being the delimiter was causing the problem I believe.
I've changed the code and app and this seems to be working.
Code: (this obviously isn't my whole code, just the sending part)
BTserial.print("R");
BTserial.print(rpm);
BTserial.print("|");
BTserial.print("G");
BTserial.print(gain);
BTserial.println("\n");
The character i send before the value is just an identifier.
Here are the app blocks, short version, have tested these with 5 values so far.