How to change the serial port in rosserial for the arduino to publish to
I am trying to change the serial port that my teensy Arduino publishes rosserial on. I already know how to change what serial port that, in this case, my raspberry pi reads rosserial from, but instead of the teensy publishing the data over USB, I would like the data to be published over Serial2. I have tried to follow the tutorial given by rosserial on changing the port, but when I try to upload the sketch to the teensy, it errors. Here is the link to the tutorial: http://wiki.ros.org/rosserial_arduino...
In case this helps, I am running Ubuntu 18.04 on my master computer, and Ubuntu-mate 18.04 on a raspberry pi for the slave computer. I have a Teensy 4.1 microcontroller that talks to the raspberry pi with rosserial. Rosserial currently works fine over USB, but I cant get rosserial to use a different serial port.
I don't know the solution, but I'm pretty sure "it errors" won't be sufficient description for anyone else to help you.
Sorry about not including the error. When I follow the tutorial exactly, by adding ros.h and the arduinohardware file, I get the error:
When I saw this error, I tried copying over all the files in the rosserial library into my current sketch folder. When I try running that, I get this error:
Oops, the forum won't let me post it, due to its length.
Ok, so the error I get from the running the sketch with the ros library inside is:
It seems that the tutorial for changing the rosserial serial port no longer works. I am using a slightly modified version of the library by James Bruton, to make it compatible with the teensy 4.1, but he showed me the files that he changed, which were small changes like increasing the buffer for sending messages. Thanks for your help!