When the output from my BLE app arrives on the arduino its just gibberish

Then try the loop time interval control in my Sketch.

how do you controll the time interval is the blocks?

We can do it with a Clock Timer, but we probably do not need to.

how do you prefer to do it?

??? Do what?

More ideas:

1 Like

adding time intervals in the blocks

Like this:

Note, the Sketch time interval should be about 20% less, so set it to 400

... note also that for testing, it is best to start with big time intervals so you can see what is going on - when you know it is working as expected, the time intervals can be tweaked shorter.

so please tell me if im wrong, what this code block does is give time in between sending each individual value?

That is true - it means that some of the values in the process will be dropped, but that should not be significant.

this works amazing! but now it only sends value when i release the slider

That's the impression it gives because you can move the slider in a couple of milliseconds but the Clock Timer is currently set to 500 Milliseconds - did you add the elapsed time code to the Sketch?

You can tweak-down the time intervals. Try 100 milliseconds in the App and 80 milliseconds in the Sketch.

im not sure what code that is but it sounds like all i have to do is add delay() right?

edit : it didnt work

no i didnt

That depends on whether you are running any hardware that could be detrimentally affected by effectively being switched on-off all the time. You can't use a delay with sensors for example, unless the time interval is measured in minutes. I posted a Sketch that shows how to perform an elapsed time delay,

can you reply to that post again? i cant tell which one it is

BLE_ReceiveString.ino (1.9 KB)

See Post #33

The only part you are really interested in now is the
// if lgPeriod milliseconds have passed, check for data from App

Set lgPeriod to 20% shorter than the App time interval

it sometimes only returns the last 3 digit of the value

also something that ive noticed is it works when you move it slowly, like REALLY slowly
after moving the slider you wait and then slide it again, if you dont, it only returns the last 3 digits of the last slide