Button bugged/Need help, Need to press twice!

Hi guys,

Just drag and drop these couple of blocks but run into quite a problem.
So the app that i wrote have 2 slider that sends 3 different value (in bytes. first byte to enter a condition "if" the other 2 bytes is the target setting) over to Arduino Nano 33 IOT when a button is pressed.

But when i pressed the "save" button this is what happen:
First press: It send 0 0 (the slider is at x1 y1)
Second press: It send x1 y1
Thrid press: It send x1 y1 ( the slider is at x2 y2)
Fourth press: it send x2 y2

The problems is I have to press the save button twice to get the right value. It would have work fine for me but since im using eeprom i have to be considered the amount of time im read/write from it :stuck_out_tongue:

It's difficult to decipher how the different pieces should be interacting, but one thing that stands out to me is that you are using the WriteBytesWithResponse method but the sketch code never writes anything back to the client. Potentially this is resulting in pending writes not executing because the earlier writes haven't been acknowledged. Have you tried using the WriteBytes method instead? A fully copy of the sketch could also be useful. Paste the sketch code here between two lines of three backticks (```) for formatting, e.g.,