I want to split a string into for variable numbers from esp32. so I used 'split at "|"' to do it. but it dosen't work.
if the string is like '388|12|1|25' then I have to get '388', '12', '1', '25' in each label.
But I just getting the whole string 388|12|1|25 from index1 which means its not splitted.
wonder what's the problem here.
next time please post a high resolution image.
After you split the stringValues, and save it to valuesList, but in later blocks, you still select list item from stringValues, why?
1 Like
ABG
March 27, 2025, 3:25am
3
Also, stringValues will be a list.
Show what arrived in global valuesList. Is it a single item list?
You will need to select item 1 to avoid getting JSON wrappers in your text split operation.
2 Likes
oh that was the problem I can't connect with my bluetooth right now. I'll try that after I go back to my room. Thank you
Sorry about that, I'll upload the whole blocks next time. I should have select list item from 'valuelist' I'll try that soon.
Using the String library is probably making a larger than default size (20bytes) BLE data packet.
We need to see your Sketch/Script to advise - upload if you need further help.
We also need to know the name and model of your microcontroller board.
ProfessorCad: Tips & Tricks Bluetooth
ProfessorCad: Tips & Tricks Bluetooth Failure
ProfessorCad: Tips & Tricks Create/Validate BLE UUIDs
1 Like
ABG
March 27, 2025, 11:32am
7
I like the Join With Separator '' text block to turn stringValues into a simple text value, regardless of list length
1 Like
I don't think I need futher help from here. I already solved the problem. The microcontroller is a esp32 btw. Thank you.
I want to thank you all for your help. I might have spend too much time with simple mistake I made. Keep up the good work!
Taifun
March 27, 2025, 1:57pm
10
How did you solve the problem?
Your solution might help others with the same problem in future
Taifun
Just like @ABG posted with the picture. I chose the wrong variable. I should have put 'global valuesList' into 'select list intem list index '. But I put 'stringValues' which is a string before splitted.
system
Closed
April 3, 2025, 7:30pm
13
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.