- Need to make the file executable
- chmod +x TeensyduinoInstall.linux64
- ./TeensyduinoInstall.linux64
Select the appropriate board
- Tools --> Board --> Teensy 3.6
- Tools --> Board --> Teensy 4.0
git clone https://github.com/ros-drivers/rosserial.git
- git checkout melodic-devel
- git pull origin melodic-devel
- catkin_make
- ros-drivers/rosserial#455
- Added defined(IMXRT1062) in ArduinoHardware.h for teensy 4.0
- Do this in ~/Arduino/libraries/ros_lib/ArduinoHardware.h
- Do this in ~/rosserial/rosserial_arduino/src/ros_lib/ArduinoHardware.h, and then rebuild ros package
... from ...
#if defined(MK20DX128) || defined(MK20DX256) || defined(MK64FX512) || defined(MK66FX1M0) || defined(MKL26Z64)
... to ...
#if defined(MK20DX128) || defined(MK20DX256) || defined(MK64FX512) || defined(MK66FX1M0) || defined(MKL26Z64) || defined(IMXRT1062)
- cd /home/$USER/Arduino/libraries
- rosrun rosserial_arduino make_libraries.py /home/$USER/Arduino/libraries http://wiki.ros.org/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup
- Do this in ~/Arduino/libraries/ros_lib/ros.h
- might also want to do here /home/$USER/microbrain_ws/src/rosserial/rosserial_arduino/src/ros_lib/ros.h ... from ...
#if defined(AVR_ATmega8) or defined(AVR_ATmega168) /* downsize our buffers */ typedef NodeHandle_<ArduinoHardware, 6, 6, 150, 150> NodeHandle; #elif defined(AVR_ATmega328P) typedef NodeHandle_<ArduinoHardware, 25, 25, 280, 280> NodeHandle; #elif defined(SPARK) typedef NodeHandle_<ArduinoHardware, 10, 10, 2048, 2048> NodeHandle; #else typedef NodeHandle_ NodeHandle; // default 25, 25, 512, 512
... to ...
#if defined(AVR_ATmega8) or defined(AVR_ATmega168) /* downsize our buffers */ typedef NodeHandle_<ArduinoHardware, 15, 15, 512, 1024> NodeHandle; #elif defined(AVR_ATmega328P) typedef NodeHandle_<ArduinoHardware, 15, 15, 512, 1024> NodeHandle; #elif defined(SPARK) typedef NodeHandle_<ArduinoHardware, 15, 15, 512, 1024> NodeHandle; #else typedef NodeHandle_<ArduinoHardware, 25, 25, 2048, 2048> NodeHandle;
Note: make sure /home/$USER/Arduino/libraries/ros_lib/ArduinoHardware.h the correction:
#if defined(MK20DX128) || defined(MK20DX256) || defined(MK64FX512) || defined(MK66FX1M0) || defined(MKL26Z64) || defined(IMXRT1062)
- Do this in tensy_centeye.launch
-
/home/$USER/arduino-1.8.13-linux64/arduino-1.8.13/hardware/teensy/avr/cores/teensy4/HardwareSerial1.cpp
-
/home/$USER/arduino-1.8.13-linux64/arduino-1.8.13/hardware/teensy/avr/cores/teensy4/HardwareSerial2.cpp
-
/home/$USER/arduino-1.8.13-linux64/arduino-1.8.13/hardware/teensy/avr/cores/teensy4/HardwareSerial3.cpp
-
/home/$USER/arduino-1.8.13-linux64/arduino-1.8.13/hardware/teensy/avr/cores/teensy4/HardwareSerial4.cpp
-
see reference here: https://forum.pjrc.com/threads/43699-teensy-3-6-serial-TX-buffer-size
-
see reference here: https://forum.pjrc.com/threads/45379-Serial-buffer-size-increase-Teensy-3-2
#ifndef SERIAL5_TX_BUFFER_SIZE #define SERIAL5_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer #endif #ifndef SERIAL5_RX_BUFFER_SIZE #define SERIAL5_RX_BUFFER_SIZE 64 // number of incoming bytes to buffer #endif
#ifndef SERIAL5_TX_BUFFER_SIZE #define SERIAL5_TX_BUFFER_SIZE 2048 // number of outgoing bytes to buffer #endif #ifndef SERIAL5_RX_BUFFER_SIZE #define SERIAL5_RX_BUFFER_SIZE 2048 // number of incoming bytes to buffer #endif
Most recently installed with arduino-1.8.13-linux64 and Teensyduino 1.53 Linux Installer (X86 64 bit)