I want to send a command to my MCU along with its data but i want to split the data because its from 3 different/separate textboxes but currently its writing everything in one line.
Instead of writing 789 to MCU i want to seperate it three values like:
7
8
9
Please also check the screenshot of MCU
B4X:
[CODE=b4x]Sub btn_Execute_Click
If connected Then
Hennyval = Hennytxt.Text
Sodaval = Sodatxt.Text
Remmyval = Remytxt.Text
TextWriter1.WriteLine("!Execute " & Remmyval & Hennyval & Sodaval & "#" ) 'send the command protocol to the Microcontroller through serial port.
TextWriter1.Flush 'clear the serialport TX buffer to make sure the previous string gets sent.
I tried this but need to press the button 3 times and I want to press it once.
'TextWriter1.WriteLine("!Henny #")
'TextWriter1.WriteLine("!Execute " & Remmyval & "#" )
'TextWriter1.WriteLine("!Execute " & Hennyval & "#" )
'TextWriter1.WriteLine("!Execute " & Sodaval & "#" )
End If
Thank you. I added the AsyncSteamsText module but i am not sure how to use it. I want to send text from the app to my MCU (NUCLEO-F446RE) using HC-06 bluetooth module. It works but the problem i have it put all these texts(numbers) from 3 textboxes into 1 line. How can I separate these texts?