Xubuntu and Teensy 3.1

After purchasing a Teensy 3.1 from pjrc.com and attempting to install their add-on software to the Arduino package already shipping with Xubuntu (an Ubuntu derivative and including the same issues in both distros), I thought I’d create a few notes to speed things along for others as the Teensy add-on is not directly (or indirectly, apparently) compatible with the Arduino IDE package provided by Ubuntu / Xubuntu. Note that I’m running Xubuntu 15.04 but I would expect similar issues with nearly any Ubuntu distro at any revision.

First, in order to speed things up and simplify installation, it’s probably easiest to use install the included Arduino package from Xubuntu.

sudo apt-get install arduino

This will also install a few other libraries and support files.

Go to System -> Users and Groups and add yourself to the Dialout group (this allows access to the serial ports). Logout or reboot so the group change can take effect.

Run Arduino so it can go ahead and create its infrastructure. If you have an Arduino, go ahead and test it to make sure the basic installation works as Teensy requires the Arduino IDE to be fully functional.

Now, remove the arduino IDE. However, do not use the autoremove feature suggested after you’ve removed the package unless you’re going to manually reinstall the various required files.

From pjrc.com, download the Teensy Linux installer (.32bits or .64bits file) and the udev rules file. From www.arduino.cc, download the latest Linux file; it’s in a .xz format.

Pick an empty working directory (I use ~/Work) and decompress the arduino .xz file. After decompressing, untar the archive and copy the resultant directory to /usr/share. Finally, rename /usr/share/arduino-xxx to /usr/share/arduino. Note where sudo must be used as normal users cannot directly write to /usr/share.

xz -d arduinoxxx.tar.xz

tar xvf arduinoxxx.tar

sudo cp arduinoxxx /usr/share/

sudo mv /usr/share/arduinoxxx /usr/share/arduino

Now, create a symlink in /usr/bin that will allow running arduino from the command line. You can add this to the menus later after all steps are complete and working.

sudo ln -s /usr/share/arduino/arduino /usr/bin/arduino

Run arduino from anywhere on the command line. You should see the standard splash screen instead of the different one included as part of the standard Ubuntu package.

Once everything is working properly from the basic arduino installation, exit and install the rules file for the teensy and the add-ons to the Arduino IDE.

sudo cp 49-teensy.rules /etc/udev/rules.d

sudo chmod +x teensyduino.64bit  <this modifies the .64bit or .32bit file to allow execution>

sudo ./teensyduino.64bit

Note you must prefix the teensyduino.64bit with the ./ or it will not run. Navigate to /usr/share/arduino and you should see the Next button become enabled, recognizing that you are in the correct Arduino IDE location. If the Next button fails to enable, hit the help (?) button and see what is missing in order to resolve the issue. After Next, click Install, and finally Done.

At this point, you should be able to start arduino, connect your Teensy, select it from the Board menu, and begin tinkering with it.

Note that I am in no way an expert on Teensy or Arduino. I’ll be happy to try to help, but my current work area is almost nothing and I have very limited ability to build any significant projects.

Hope this helps; it wasn’t very intuitive for me and took a couple of hours to sort. If this shaves some time off for anyone, it’ll be worth it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.