Sunday, October 2, 2016

Teensy 3.6 Tips


These are just a few things that I ran into getting basic sketches working on the new Teensy 3.6. A lot of these tips are for someone running Linux.

- Currently, Teensyduino software (1.30) requires Arduino IDE 1.6.11. You can get it here:

https://www.arduino.cc/en/Main/OldSoftwareReleases#previous

- Install Arduino first. On Linux, I had to give the 'J' option to 'tar' because the file used 'xz' compression. Then run the Teensyduino downloaded file (you might have to make it executable first) and point it at the Arduino installation directory. The 'Next' button will stay grayed out until you point it at an Arduino directory that it likes.
- For Linux, the Teensyduino didn't install the file 49-teensy.rules. I found it here:

https://www.pjrc.com/teensy/49-teensy.rules

It should be copied, as root, to /etc/udev/rules.d. I don't know if it's completely needed, but I suspect that this is where /dev/ttyACM0 comes from (below).

- In the Arduino IDE, board type should be Teensy 3.6, and USB type should be 'Serial'. That's all I had to change.
- Make sure you use a data-capable USB cable to connect to the Teensy. Power-only cables are all too common as give-aways with new phones. (Remember, these are the guys who made USB-C cables that blew up laptops.) The clearest sign that you're using a power-only cable is that the operating system won't even register that you plugged something in. Uploading certainly won't work.
- Before 'Serial.print()' will work, you need to:
-- Put 'Serial.begin(9600)' in your 'setup()' routine:

void setup()
{
    Serial.begin(9600);  // the speed doesn't matter
    // other stuff
}

-- Upload it to your Teensy.
-- Look under Tools::Ports and select the port that looks like the operating system accidentally found it. For me on Linux, it was '/dev/ttyACM0'.
-- Select Tools::Serial::Monitor.

You should see your print-outs in this new window.

- Remember that a pin number on one type of board may not be the same on another. The LED on the Teensy 3.6 is 13.

That's it for now. More as I continue to play with this thing...