because they don't work
Creating a function inside a string receiver is limited
Please elaborate what you are trying to do and provide an example text string
Btw it does not help very much to set a boolean value to itself. You should set it to true or false.
And next time before taking a screenshot please set the language to English
Taifun
Dear @Julio_Macias, as @Taifun has already said, it would increase the possibility to get help by the forum if you convert your blocks in English.
But, having said that, I suppose you say that the execution of a procedure within a BLE receive event is not working for timing purposes ? Or other ?
Anway what I can suggest is:
in the receiving event don't call the procedure
set a clock that ticks every 50 milliseconds, that calls the parsing procedure (the timing is just an example, it shall be anyway faster than the sending rate from your ESP32)
Is this want you want ?
PS to speed up the parsing procedure you can try a "trick" (not tested yet...):
put the complete "if" sequence in a while "received string not empty" loop
when an "if" finds the string, do the relevant blocks, resets to empty the string and use the "break" block (this will exit the "while" loop by skipping all the remaining if)
if none of the "if" finds the string, you shall reset to empty the received string ANYWAY (so to exit the loop ) and you can raise a temporary popup saying "string not recognized".
That's probably not so elegant, but it could work... ![]()
Honestly I don't know whether the "break" block takes precedence on the remaining "else if" but it could worth a try....
The clock1 is enabled only after a successful BLE communication is started.