Ayabonga
Member
Hello guys,
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
[/CODE]
code.
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
code.