This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
Hello,
I am using Energia 1.6.10E18 and I'm trying to use the multiserial example .
void setup() {
// initialize both serial ports:
Serial.begin(9600);
Serial1.begin(9600);
}
void loop() {
// read from port 1, send to port 0:
if (Serial1.available()) {
int inByte = Serial1.read();
Serial.write(inByte);
}
}
When opening the example project and trying to verify - I get the error :\Local\Temp\arduino_modified_sketch_33016/MultiSerial.ino:22: undefined reference to `Serial1'
Other functions work well, even using just Serial.begin(9600) can create a failure free project.
How can I get rid of the undefinded Serial1 ? Where is it defined?
Any help is appreciated
That isn't true across the entire Launchpad product line. I have used Serial and Serial1 on both the MSP432 Launchpad the MSP430F5529 Launchpad. There may be others but I can speak with certainty with regard to the two aforementioned boards. If the OP is using the original MSP430G2 Launchpad then that one only has one hardware serial port.
Unfortunately, the 2553 only has one serial port so Serial1 is not available on that device. The MSP430F5529 might be a good choice as it does have 2 serial ports. The MSP432 has 4 ports but , to the best of my knowledge, only 2 of those ports are available in Energia. All 4 are available if you use CCS.
Even though the documentation references ports beyond Serial1, and even if the device has more than two ports, I don't believe they have been implemented in Energia as of yet.
**Attention** This is a public forum