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:
-
Use this Slider extension:
[FREE / Open Source] SliderTools - Bit of useful feature for sliders -
Changes the way to get the characters.
https://community.appinventor.mit.edu/t/hm-10-ble-arduino-uno-notify-bluetooth-at-ibeacon-arrhythmia/12621/6
...
void loop(){
if(HM10.available()) {
caracter = HM10.read();
mensaje = mensaje + caracter;if(caracter == NULL ) {
Serial.println(mensaje);
flotante = 7.101031f * mensaje.toFloat() / 3.303071f;
... -
Try NullTerminateString = false
https://community.appinventor.mit.edu/t/hm-10-ble-arduino-uno-notify-bluetooth-at-ibeacon-arrhythmia/12621/3
adding time intervals in the blocks
... 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
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