I have such a problem. I bought a new computer and installed Arduino on it and I would like to compile with Serial, I have an error
c:/users/backu/appdata/local/arduino15/packages/stmicroelectronics/tools/xpack-arm-none-eabi-gcc/10.3.1-2.3/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: core\core.a(HardwareSerial.cpp.o):(.bss.Serial2+0x0): multiple definition of `Serial2'; sketch\iBus.ino.cpp.o:(.bss.Serial2+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Compile error for board Generic STM32F4 series.
Code: Select all
#include <IBusBM.h>
IBusBM IBusServo;
HardwareSerial Serial2 (PA3, PA2);
void setup() {
Serial.begin(115200);
Serial2.begin(115200);
IBusServo.begin(Serial2);
}
void loop() {
ibusServo();
}
//
//
//
void ibusServo()
{
// show first 14 servo channels
for (int i=0; i<14 ; i++) {
Serial.print("Ch");
Serial.print(i);
Serial.print(": ");
Serial.print(IBusServo.readChannel(i));
Serial.print(" ---- ");
}
Serial.println("Next");
delay(2000);
}