Arduino Teensy 3.5 Setup - olinrobotics/gravl GitHub Wiki
GRAVL uses the Arduino Teensy 3.5 as the tractor's hindbrain. This choice was made because the Teensy is much faster than a convential arduino, has more storage space, and has multiple hardware serial ports. It requires a special setup to interface with the Arduino development environment. Although there are newer versions of the Teensy, they typically run on 3.2 volts, making them easy to fry. the 3.5 runs off of 5v, and is a bit more resilient to wiring accidents.
- Download Linux version of the Arduino IDE
- Extract arduino folder to the downloads folder, then move it to /opt: (eg:
arduino-#.#.#
isarduino-1.8.5
for arduino 1.8.5)
cd Downloads/
sudo mv arduino-#.#.# /opt
- Run the install.sh executable inside the arduino folder:
cd /opt/arduino-#.#.#/
sudo ./install.sh
- Download latest Linux 64 bit version of Teensyduino
- Navigate to Downloads folder and make the Teensyduino file an executable:
cd Downloads/
chmod +x TeensyduinoInstall.linux64
- Run the executable and navigate the install window that follows:
./TeensyduinoInstall.linux64
- Upon being asked the location for install, select your newly installed arduino folder /opt/arduino-#.#.#:
- Go into teensy_patch (a folder in the gravl repository) and copy the resulting files into /opt//hardware/teensy/avr/cores/teensy3/
cd ~/catkin_ws/src/gravl/teensy_patch
cp * /opt/arduino-#.#.#/hardware/teensy/avr/cores/teensy3/
- Go into udev_rules and copy the resulting files into /etc/udev/rules.d/
cd ~/catkin_ws/src/gravl/udev_rules
sudo cp * /etc/udev/rules.d/
- Install rosserial through your systems package manager:
sudo apt-get install ros-kinetic-rosserial ros-kinetic-rosserial-arduino
- Go to the libraries folder in your arduino install and remove the ros_lib folder:
cd /opt/arduino-#.#.#/libraries/
rm -rf ros_lib
- Regenerate the ros_libfolder:
rosrun rosserial_arduino make_libraries.py .
Note: This process is necessary because Rosserial on Indigo has not been updated to allow class members to be callbacks for subscribers. A pull request has been submitted to fix the problem, and these commands may be deprecated in the future.
- Clone olinrobotics/rosserial into your catkin workspace source directory:
cd catkin_ws/src/
git clone https://github.com/olinrobotics/rosserial.git
- Remove your current version of rosserial, if you have it:
sudo apt-get remove ros-indigo-rosserial
- Checkout the indigo devel branch within the rosserial directory that you just cloned.
git checkout indigo-devel
- Catkin make in your catkin workspace:
cd catkin_ws/
catkin_make
- Go to the libraries folder in your arduino install and remove the ros_lib folder:
cd /opt/arduino-#.#.#/libraries/
rm -rf ros_lib
- Regenerate the ros_libfolder:
rosrun rosserial_arduino make_libraries.py .
If you are setting up your system to be able to upload code to Kubo's hindbrain, you will need to download some other libraries. go to The RoboClaw Wiki Page for more info.
For more detailed information, visit this page
- https://arduino.stackexchange.com/questions/15893/how-to-compile-upload-and-monitor-via-the-linux-command-line
- https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc
ERROR: Upon running Arduino IDE Step 3, got repeats of error:
touch: cannot touch '/home/cnovak/.local/share/icons/hicolor/.xdg-icon-resource-dummy': No such file or directory
IDE works fine, not sure if this error is important.
Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino
Solution 1: Change programmer to Arduino as ISP https://answers.ros.org/question/210875/arduino-rosserial-unable-to-sync-with-device/ ##
Solution 2: Update rosserial
Solution 3: Check baud rates in launch file + arduino
Solution 4: Lower baud rates
Note: Still unsolved - only Nathan's computer works
stat /home/cnovak/Workspaces/catkin_ws/src/gravl/src/hind_brain/lib: no such file or directory
Error compiling for board Teensy 3.5.
This error is due to the broken symlink lib
. The Arduino compiler is attempting to access the libraries/
folder of your arduino install and failing because the symlink no longer points to the correct location. to see where the symlink points, navigate to gravl/src/hind_brain
and run the following command:
ls -l lib
This command lists the files in the directory, the -l
means to use longlisting format, and using lib
specifies the symlink.
The path on the right hand side of the ->
arrow shows where the symlink points, a location that most likely doesn't exist. Mine was /opt/arduino/libraries
. It didn't exist because I had updated my IDE, and that folder was now located at /lot/arduino-1.8.9/libraries
.
Solution 1:
Update the symlink lib
:
- Remove current symlink:
rm lib
- Create new updated symlink (use the path to your arduino
libraries/
directory here):
ln -s /opt/arduino-1.8.9/libraries lib
This command creates a new link called lib
that points to the specified location. The -s
arg means that the link will be symbolic, which holds arbitrary text and points to a location, rather than a specific file (more info here).