diff --git a/rosserial_arduino/src/ros_lib/ArduinoHardware.h b/rosserial_arduino/src/ros_lib/ArduinoHardware.h index 08fbbd5e6..083ce1e0b 100644 --- a/rosserial_arduino/src/ros_lib/ArduinoHardware.h +++ b/rosserial_arduino/src/ros_lib/ArduinoHardware.h @@ -71,8 +71,12 @@ class ArduinoHardware { ArduinoHardware() { #if defined(USBCON) and !(defined(USE_USBCON)) - /* Leonardo support */ - iostream = &Serial1; + #if defined(_SAM3XA_) + iostream = &Serial; + #else + /* Leonardo support */ + iostream = &Serial1; + #endif #elif defined(USE_TEENSY_HW_SERIAL) or defined(USE_STM32_HW_SERIAL) iostream = &Serial1; #else