Getting Started with the Teensy
The Teensy line is a collection of microcontrollers from PJRC based around several different powerful ICs. This basic getting started guide will help you start using the Teensy that's best for your project.
To follow along with this tutorial, you will need the following materials. You may not need everything though depending on what you have. Add it to your cart, read through the guide, and adjust the cart as necessary. You will need the appropriate USB cable for the Teensy board with which you are working. The following boards work with the micro-USB cable:
The Teensy++ 2.0 works with the mini-USB cable:
You will also need the appropriate headers for your project. There are several different options available. Below are a few common headers used with the boards.
Alternatively, if you are planning on doing a lot of intense soldering, you can also use the following wishlist as a guide.
If you aren't familiar with the following concepts, we recommend reading these articles first before continuing with this getting started guide.
How to Solder: Through-Hole Soldering
Installing an Arduino Library
Serial Peripheral Interface (SPI)
Installing Arduino IDE
Check out some of the related videos.
Each Teensy board has its own key features which are highlighted here. For individual pinout diagrams and detailed schematic information, please check PJRC's page here. The pin functionality for each version is can be different so make sure to check before switching versions.
For a detailed comparison chart of the Teensy, check out the Teensy Technical Specifications page.
The Teensy 4.0 is the same size and footprint as the Teensy 3.1/LC but even more powerful with its whopping 600MHz clock speed! The pin functionality is slightly different compared to the other versions. This runs off of the NXP iMXRT1062 IC, which is a 64-bit ARM Cortex-M7. It is 3.3V tolerant only on its I/O pins.
|Real Time Clock||1|
|Flash||2048K (64K reserved for recovery & EEPROM emulation)|
|RAM||1024K (512K is tightly coupled)|
The Teensy 3.6 uses a similar pinout as the smaller Teensys. However, the board breaks out more pins and includes a microSD card socket. This runs off of the MK66FX1M0VMD18 IC, which is a 32-bit ARM Cortex-M4. It is 3.3V tolerant only on its I/O pins.
|Real Time Clock||1|
|Touch Sense pins||11|
The Teensy 3.5 is similar to the 3.6. This runs off of the MK64FX512VMD12 IC, which is a 32-bit ARM Cortex-M4. It is 5V tolerant on its I/O pins.
|Real Time Clock||1|
|Touch Sense pins||0|
The Teensy 3.2 is the same size and footprint as the Teensy LC but more powerful. This runs off of the MK20DX256 IC, which is a 32 bit ARM Cortex-M4. It is also 5V tolerant on its digital I/O pins and can provide up to 3.3V at 100mA to other devices. The analog pins are 3.3V tolerant only.
|Real Time Clock||1|
|Touch Sense pins||12|
The pushbutton on the 3.1 is a reboot trigger and does not reset the entire system, similar to the pushbutton on the LC. In order to reset the board, you must access the
RESET test point on the bottom of the board.
Teensy ++ 2.0
This Teensy board is the only AVR-based Teensy that SparkFun carries. It runs off of the AT90USB1286, an 8 bit AVR running at 16MHz. It also has the largest footprint of all of the Teensy boards, at 1.375 in2.
The push button on the end of the Teensy 2.0 ++ is a
RESET button. This is also used during programming the Teensy with Teensyduino, discussed later.
The Teensy LC is 0.98 in2. It runs off of the 32 bit ARM Cortex-M0+ at 48MHz and runs at 3.3V.
The Digital to Analog converter is on pin A12 of the microcontroller. Pin
17 outputs voltages up to the supplied
Vin voltage, at 8mA.
D21 can source signals up to 20mA. All other pins are limited to 5mA.
|Touch Sense Pins||11|
The pushbutton on the LC is not a reset button but instead triggers HalfKay mode. This allows the board to reboot to the newest code or accept new uploaded code.
When it comes to soldering your Teensy, there are many different options available to you. IF you have not soldered before, make sure to check out the following tutorial!
How to Solder: Through-Hole Soldering
September 19, 2013
Solder Directly Into Your Circuit
We generally recommend against soldering directly between any two boards you want to connect -- if something burns out or is connected incorrectly, you've set yourself up for a lot of annoying rework (and the danger of ripping a pad off of the board).
One benefit of soldering directly to your circuit however is that it gives a very small profile for the project. If you plan on doing this, we recommend testing your circuit design with Alligator clips or Pig-tail cables before hand to verify functionality.
Most users prefer using male headers on the Teensy and matching female headers on other boards into which the Teensy fits.
If you plan on using this method, you must ensure you solder the headers on straight, otherwise you're going to have a hard time inserting or removing the Teensy from other boards.
We recommend inserting headers into a breadboard and soldering the Teensy on from there.
After you finish soldering the headers along the length of the board, your Teensy may look similar to the image below depending on your project.
Using male headers with the Teensy allows you to solder the headers on nice and straight, preventing crooked header insertion. As you can see from the images above however, if you intend to use the Teensy LC or Teensy 3.1+ on a breadboard, you cannot solder all of the headers.
If you've already soldered together a board that works with the Teensy LC/3.1, you can simply line your headers up in that board to hold them straight while soldering to the Teensy.
Once the headers are lined up straight, it's easy to simply 'plug' the Teensy into the headers and solder everything together.
If you do solder your headers on like this, keep in mind it may limit your access to the push button on board, requiring you to break out the reboot/reset signal from the header pin.
What about Those Additional Headers on the LC/3.1+?
There are a few options to work with these pins. You can:
a) Leave them unconnected (boring!)
b) Solder wires to the pins as you find uses for them
c/d) Solder headers on the top/bottom
If you go for options c or d, there's an easy way to solder connectors on there without driving yourself crazy attempting to solder a lonely pin by itself.
If you are using male headers, you can use pliers to push/pull one of the pins out. This will allow you to use the spacer to hold the pins straight, but will remove the non-compatible pin.
If you are using female headers, this method won't work, but you can still use the pliers to pull out the unnecessary pins.
Once the header strip has been modified, simply line it up with those holes, and solder them.
Both the 3.1+ and LC Teensy boards have SMD pins on the board bottom that you can solder to. If you know you will need access to these pins, we recommend that you solder the headers onto the top side of your Teensy.
If you already have another Teensy soldered, you can use this as a soldering jig to keep the headers straight, as shown below.
With the headers soldered onto the Teensy this way, the user has access to all of the SMD pads on the bottom of the board. Keep in mind however, this does minimize access to the pushbutton, so balance that with your project needs.
If you need help with soldering to the SMD pads on the bottom of the board, please check out our tutorial here.
You can also check out this video for SMD soldering tips and tricks.
To start working with the Teensy, all you need to do is plug in your USB cable to your computer and your Teensy board. There are two options for programming the Teensy boards - the Arduino IDE or your favorite C compiler.
Teensyduino Add-On Installation
You will need to download the Teensyduino add-on for Arduino. You can find the Teensyduino download from PJRC here.
Please follow their installation instructions for the most up-to-date version of the Teensyduino. You will also need to select which Teensy-compatible libraries you'd like to install at that time. If you aren't sure which libraries you will want, you can always download them and install them later from the curated list.
Programming the Teensy
When you first plug the Teensy in, the appropriate drivers will be installed (if using a Windows machine). Your Teensy should default to the standard
Blink sketch. You should see the LED blinking, as a quick check to make sure your board is functioning.
Open up the Arduino IDE, and select the appropriate Teensy board from the
Board menu. This will provide you with additional options in the
If you would like to use the Teensy as an HID, MIDI, or user interface device (such as a keyboard or mouse), you can select that option from the
USB Type menu.
The CPU speed can be changed for low-power applications.
Keyboard Layout option can be updated to your preferred style.
Press the button on the Teensy to open the Teensy loader program. You should see this window:
Verify your example code, and upload to the board as usual in the Arduino IDE. You will need to hit the on-board button once the IDE has compiled the code to finish uploading it to your Teensy. You should only need to do this the first time you upload code for the duration that your Teensy is powered.
This is typically a more advanced option. For step-by-step instructions on using a C-compiler for the Teensy, please check out PJRC's directions here. You will still need to download and install the Teensyduino and modify the Arduino files to use the
Makefile for the Teensy boards.
Additional support for other languages is slowly being added. Please check here for more information.
For those that are comfortable with Python language, you can also load MicroPython on the Teensy! Check out the following tutorial for more information on getting started.
How to Load MicroPython on a Microcontroller Board
September 4, 2018
Having trouble using your Teensy? Try checking out some of the common troubleshooting tips from PJRC when using your Teensy.
Resources and Going Further
Now that you have a basic understanding of working with the Teensy, it's time to start building projects with one! Make sure to check out the schematic for your particular Teensy when building any new projects.
Need some inspiration for your next project? Check out these additional resources for more information and other project ideas.
- PJRC Homepage
- Teensy 2.0 ++ AT90USB Datasheet
- Teensy 3.1 ARM Cortex-M4 Datasheet
Or check out the following tutorials for inspiration.
Teensy Arduino Shield Adapter Hookup Guide
Vox Imperium: Stormtrooper Voice Changer
TeensyView Hookup Guide
Or check out some of these blog posts for ideas.