P Peter Augustin Member Licensed User Longtime User Oct 29, 2013 #1 Hi all, i try develope my first application MCU with Android. My problem is with sending string from Android to MCU. I send from Android the string "LED1_status" and i wait for MCU's answer. The answer does not come. I think, the problem is, that MCU does not receive the string in one line. Could someone help me ? Code: TextWriter1.WriteLine("LED1_status") TextWriter1.Flush If TextReader1.ReadLine = "0" Then btnLED1.Color = Colors.Red Else btnLED1.Color = Colors.Gray End If Attachments terminal_178.png 30.1 KB · Views: 668
Hi all, i try develope my first application MCU with Android. My problem is with sending string from Android to MCU. I send from Android the string "LED1_status" and i wait for MCU's answer. The answer does not come. I think, the problem is, that MCU does not receive the string in one line. Could someone help me ? Code: TextWriter1.WriteLine("LED1_status") TextWriter1.Flush If TextReader1.ReadLine = "0" Then btnLED1.Color = Colors.Red Else btnLED1.Color = Colors.Gray End If
Erel B4X founder Staff member Licensed User Longtime User Oct 29, 2013 #2 I don't recommend you to use TextWriter in this case. You should use AsyncStreams. You should also check which type of 'end of line' character this device expects. Upvote 0
I don't recommend you to use TextWriter in this case. You should use AsyncStreams. You should also check which type of 'end of line' character this device expects.
P Peter Augustin Member Licensed User Longtime User Oct 29, 2013 #3 Oky. I look, that AsyncStreams is more complicated. Thanks. Upvote 0