Answer the question
In order to leave comments, you need to log in
How to force the application to receive-send data to the com port in arduino?
There is a virtual port on which the arduino receives and sends data.
there were no problems with getting arduino data from the application
public void SendData(string text)
{
if (port.IsOpen)
{
port.WriteLine(text);
}
}
private void button2_Click(object sender, EventArgs e)
{
port.Open();
SendData("StartTimer");
port.Close();
}
Answer the question
In order to leave comments, you need to log in
Port closed - no data. when the port is open, the data accumulates in the receive buffer until you read it through Read or ReadLine.
It's a pity there are no options for your reading, there would be more sense.
Well, the most likely reason is that you are reading from Windows using the ReadLine method, which waits for the end of the line in the form 0x0d0a, and writing arduino, which most likely sends one character 0x0d.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question