Unable to read sensor values on the app

You need an if/then test on characteristUUID to decide which Labels.Text get the incoming floats.

By the way, since it is a list, it will appear in brackets , which you can avoid by selecting item 1 of the list.

1 Like

I am trying to do the if/then test on characteristUUID like this:


And the timer block looks like this:

The output is as follows:
Sensor A: Nothing
Sensor B: Nothing
Sensor C: alternating value of sensor A and sensor B at timer's interval

I think the equality operator in the FloatsReceived block is not working.

The blocks look fine
We already talked about debugging...

As test use a label to display characteristisUuid and 2 more labels to display the 2 global variables

Taifun

1 Like

Like this?



For a fraction of a second, the value in the black box becomes 0001 and so does the value in the red box which at that moment displays sensor B's actual value. Thank you.

I think I found the problem, @Taifun. The characteristicuud has a small 'a' in '181a' while the characteristicuuid of sensor A and sensor B has a capital 'A' in '181A'. This might be the reason why the if/then logic is not working.

1 Like

@Taifun , @ABG and @uskiara Thank you for sharing your ideas to solve my problem. Instead of comparing the characteristicuuid with characteristicuuid of sensors, I directly campared the characteristicuuid with actual values with lower case a. But I wonder why is the timer block changing UUIDs to lowercase letters?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.