rosserial Teensy bluetooth problem
Hello,
I'm trying to use rosserial with Teensy 3.5 through bluetooth.
My first step: change the serial port from Serial to Serial1.
I follow the thread: https://answers.ros.org/question/1982...
It compiles with Arduino Mega board but no with Teensy 3.5 (or other Teensy boards)
I use: Ubuntu 16.04, Kinetic ros, Arduino 1.8.5 The Hello World example code: http://wiki.ros.org/rosserial_arduino...
I tried to ways:
Modify the line 73 in the code arduino.1.8.5/libraries/ros_lib/ArduinoHardware.h
iostream = &Serial1;
Replace:
ros::NodeHandle nh;
with:
class NewHardware : public ArduinoHardware
{
public:
NewHardware():ArduinoHardware(&Serial1, 57600){};
};
ros::NodeHandle_<NewHardware> nh;
The error when I try to compile is:
.../arduino-1.8.5/libraries/ros_lib/ArduinoHardware.h:67:5: note: no known conversion for argument 1 from 'HardwareSerial*' to 'usb_serial_class*'
no matching function for call to 'ArduinoHardware::ArduinoHardware(HardwareSerial*, int)'
ArduinoHardware.h: http://docs.ros.org/jade/api/rosseria...
What is your original problem (i.e., please update your question with a copy and paste of the error)? Why are you modifying the source code of a library? Can you please update your question with a copy and paste of of the code that you wrote?
@jordiguerrero: please post your last edit as an answer, and then accept your own answer.
Also: I don't see
#define USE_TEENSY_HW_SERIAL
in your last edit?Ok, I make the changes. Sorry about any inconvenient, it is my first post...
No need to apologise. Just keep it in mind for next time.