Trying to change button colour based on Bluetooth text received

Tried numerous ways (searched topics) but i am missing something. If I receive a “Z” from bluetooth I want a button to turn green otherwise stay default colour. Anyone do this before

if var = Z, then button.backgroundColor = green

blocks (10)

not seeing “global bluetoothValue” as an option

That is just a variable I created, I do not know how you are handling your bluetooth response.

the data is being displayed in a label

You might get better results with a text Contains ‘Z’ test, in case your incoming data is clumped up.
We haven’t seen your blocks yet.

Please download and post each of those event block(s)/procedures here …
(sample video)

got it working. thanks.

please provide a screenshot of the working solution then
this might help others in the future. Thank you.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

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