String conversion to number using BluetoothLE

Hello,
I've checked different topics related to string conversion into numbers without an applicable tip.

I'm getting ...

Screenshot 2024-10-09 231336

because of ...

Screenshot 2024-10-09 233713

global_flow is a string received by bluetooth "76.26" and I though to convert into a number while I divide it by 100.

I know this is a newbie topic :slight_smile: I'm still not familiar with MIT app inventor self convertions

does anyone catch my issue?

Your issue is that your string is inside a list, try like this:

image

Your variable global flow will then have a number value of 0.7626

(Label1.text will be a string)

2 Likes

Show how you send and receive the flow.

1 Like

Hi @TIMAI2 and @ABG ,
I think you're right the issues is linked to the creation of the string though "call BluetoothLE1.RegisterForStrings" that give a list as output, if I'm not wrong...

I'll try to pick the first item and see what happen
...now I understand the reason for the double brackets displaying "global_flow" :sweat_smile:

image

Hello guys,
here the confirmation, issue solved! thanks again

I've removed the list immediately after string receival :slight_smile:

1 Like