So, I had this all typed up and ready to go but decided to try one last thing before I posted it. Turns out that worked. I had copied the old HardwareSerial.h and HardwareSerial.cpp to HardwareSerial_orig.h and HardwareSerial_orig.cpp and left them in the same folder when I tried the newer versions from GitHub. I think those renamed, old files were causing problems when compiling. With the new files in the directory and the old files moved elsewhere, my code compiles and works.
My problem (at least this one) is solved, but I still wanted to post this. I spent a few hours searching and trying stuff before I figured out my solution. Maybe this information will be useful for someone else. Mods, if this should go in a different section, please feel free to move.
Below is my original post.
Hello, all. I'm not sure that "Programming Questions" is exactly the right place for this question. Mods, if it should be moved, please feel free to do so.
I'm using an Arduino Uno with the Arduino IDE running on a Linux system (Ubuntu 12.04 if it matters). I'm trying to use the Arduino to interface with another device via the serial TX/RX pins. Based on what I see on an oscilloscope, I believe the other device uses 8 bit, odd parity, 2 stop bit UART configuration. I run into issues when I try to configure the Arduino's serial port as explained in the Serial reference available on the Arduino website. When I try to compile the following code:
Serial.begin(9600,SERIAL_8O2);
I receive the following error:
responder.cpp:48:21: error: ‘SERIAL_8O2’ was not declared in this scope
I checked in HardwareSerial.h, where I believe it should be declared, and saw no sign of it. From what I've read, SERIAL_8O2 is supposed to be defined as 0x3E, so I tried this code:
Serial.begin(9600,0x3E);
And got this error message:
responder.cpp:48:25: error: no matching function for call to ‘HardwareSerial::begin(int, int)’
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:52:10: note: candidate is: void HardwareSerial::begin(long unsigned int)
So it looks like the optional configuration argument for Serial.begin() isn't supported in the Serial libraries I have. I found versions of HardwareSerial.h and HardwareSerial.cpp on GitHub and tried those, but I got even more errors. So, any thoughts?
Thank you all for the help I'm sure you would have provided had I not figured out a solution.