rosserial with Teensy 3.1 comm port
The current rosserial package (Jade) includes an Arduino library (ros_lib) that has been updated to recognize Teensy 3.1. It appears that when Teensy 3.1 is recognized, the serial port is automatically set to USB. I don't want to use USB, I want to use a UART to communicate with the ROS master (Beaglebone Black).
Am I missing something? Is there a configuration parameter or function call that will let me set the desired serial port on the Teensy? Or, failing that, some safe way to hack it?
If anyone has been successful (or not) setting up rosserial communication between Beaglebone Black (Ubuntu 14.04) and Teensy 3.1 I would like any information you can provide.
Below is some code from ArduinoHardware.h. If I don't want USB communications, which of the alternatives will work best for Teensy 3.1?
#if ARDUINO>=100
#include <Arduino.h> // Arduino 1.0
#else
#include <WProgram.h> // Arduino 0022
#endif
#if defined(__MK20DX128__) || defined(__MK20DX256__)
#include <usb_serial.h> // Teensy 3.0 and 3.1
#define SERIAL_CLASS usb_serial_class
#elif defined(_SAM3XA_)
#include <UARTClass.h> // Arduino Due
#define SERIAL_CLASS UARTClass
#elif defined(USE_USBCON)
// Arduino Leonardo USB Serial Port
#define SERIAL_CLASS Serial_
#else
#include <HardwareSerial.h> // Arduino AVR
#define SERIAL_CLASS HardwareSerial
#endif
Did you see this answer? I've got this to work for changing the serial port of the Mega, haven't tried with the Teensy yet.