2
\$\begingroup\$

I'm having trouble talking to an Arduino Mega using serial port commands on Windows. Identical code works fine to connect to an Arduino Duemilanove but doesn't allow connection to the serial port with the Mega. Also, I can access both cards from the Arduino IDE software, on both Linux and Windows.

I have serial port code that works fine on Linux for both Duemilanove and Mega. But I can't write code that works for the Mega on Windows, even though it works fine with the Duemilanove at this stage.

My only thought is that perhaps something is different in the way that the Mega's USB-to-serial hardware is set up, and perhaps, at least on Windows, I need to add some additional command (maybe on the Arduino, or maybe in my C code) to enable the interface to be correctly visible/accessible.

Any thoughts anyone? Anyone else had this problem?

tyblu
8,3576 gold badges43 silver badges71 bronze badges
asked Oct 7, 2010 at 4:19
\$\endgroup\$
3
  • 1
    \$\begingroup\$ please post a sample of your code \$\endgroup\$ Commented Oct 7, 2010 at 12:51
  • \$\begingroup\$ Is this one of the new megas with the atmega-u8? \$\endgroup\$ Commented Oct 18, 2010 at 14:59
  • 2
    \$\begingroup\$ The mega has 4 serial connections, the one that goes through USB is the one that is on digital pins 0 and 1, I believe. Make sure those pins are clear, and that your C program has selected the right baudrate. \$\endgroup\$ Commented Oct 18, 2010 at 17:23

1 Answer 1

1
\$\begingroup\$

This sounds like you might be having a baud rate mismatch. I have seen many cases where a device or library will default to a particular baud rate and wont be an issue until switching devices or platforms.

The other possibility is using a serial class that only works on linux.

answered Nov 22, 2010 at 17:58
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.