Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino Mega 2560 Response Problem #4

Open
ghost opened this issue Apr 15, 2016 · 1 comment
Open

Arduino Mega 2560 Response Problem #4

ghost opened this issue Apr 15, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 15, 2016

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.

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}"); 
}

...

@VladimirAkopyan
Copy link

VladimirAkopyan commented Nov 27, 2016

I don't know much about the library, but your baud rate is 250,000.
ATmega doesn't support speeds above 115,200.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant