i'm using SerialPortLib for communicating with Arduino Mega 2560.
My code written like in Example usage manual section.
Sending data to serial is correct, but the event MessageReceived does not raise.
is any suggestions about my problem?
Thank you.
var serialPort = new SerialPortInput();
serialPort.ConnectionStatusChanged += SerialPort_ConnectionStatusChanged;
serialPort.MessageReceived += SerialPort_MessageReceived;
serialPort.SetPort("COM3", 250000);
serialPort.Connect();
foreach (var workContext in WorkContexts.Where(c=>c != null)) {
var cmd = workContext.CommandFrame;
var message = Encoding.UTF8.GetBytes(cmd);
serialPort.SendMessage(message);
Console.WriteLine($">> {cmd}");
}
...
Sorry for my English.
i'm using SerialPortLib for communicating with Arduino Mega 2560. My code written like in Example usage manual section. Sending data to serial is correct, but the event MessageReceived does not raise.
is any suggestions about my problem? Thank you.