📋 Overview
The PJRC Teensy 4.1 is a high-performance microcontroller development board built around the NXP IMXRT1062 ARM Cortex-M7 processor running at 600 MHz. It's one of the fastest and most capable microcontroller boards available, with 8MB of flash memory, 1MB of RAM, and an extraordinary range of built-in peripherals including Ethernet, a microSD card socket, and a USB host port.
Despite all that power, the Teensy 4.1 is programmed using the familiar Arduino IDE — so if you've used an Arduino before, you'll feel right at home. This guide will walk you through everything you need to get started, from installing the software to uploading your first program.
⚠️ Important: All Teensy 4.1 I/O pins operate at 3.3V. The pins are not 5V tolerant. Do not apply more than 3.3V to any digital or analog pin, or you may permanently damage the board.
🛠️ What You'll Need
Required
- USB Micro-B Cable — For programming and powering the board. Make sure it's a data cable, not a charge-only cable.
- Computer — Windows 10/11, macOS, or Linux with a USB port.
- Arduino IDE — Version 2.0.4 or later recommended (free download from arduino.cc).
Recommended
- Header Pins (2x 24-pin strips) — Required for breadboard use if the board was purchased without soldered pins. Soldering is required.
- Soldering Iron & Solder — For attaching header pins and optional accessories.
- Solderless Breadboard — For prototyping circuits.
- Jumper Wires — For making connections on the breadboard.
Optional Accessories
- Ethernet Kit (RJ45 MagJack) — Required to connect an Ethernet cable. Available in both the version from PJRC (requires assembly) and from SparkFun (preassembled).
- 8MB PSRAM Chip — Solders to the bottom of the board for expanded memory.
- USB Host Cable — For connecting USB devices (keyboards, MIDI controllers, etc.) to the Teensy's host port.
- CR2032 Coin Cell Battery — For maintaining the Real-Time Clock (RTC) while power is off.
- PJRC Audio Shield (Rev D) — For high-quality stereo audio input and output.
🔧 Board Overview
The Teensy 4.1 shares the same form factor as the older Teensy 3.6 — measuring approximately 2.4 × 0.7 inches (61 × 18 mm). Despite its small size, it packs an impressive amount of functionality onto the board.
Key Components on the Board
- NXP IMXRT1062 Processor — The main ARM Cortex-M7 chip, located in the center of the board.
- 8MB Flash Memory Chip — Stores your program code (W25Q64JV).
- DP83825 Ethernet PHY — Provides 10/100 Mbit Ethernet capability.
- MicroSD Card Socket — On the underside of the board, near one end.
- USB Micro-B Connector — The main USB port for programming and communication with your computer.
- USB Host Pads/Pins — Five pins for connecting USB devices to the Teensy (requires USB host cable).
- Program Button — A small pushbutton used to enter bootloader mode for programming. This is not a reset button.
- Orange LED — Connected to Pin 13. Blinks slowly on brand-new boards running the factory-loaded blink program.
- Red LED — Dedicated bootloader status indicator. Dim when the bootloader is waiting; bright while writing to flash.
- VBAT Pads — For connecting a CR2032 coin cell to power the RTC while the board is off.
- QSPI Memory Pads — Two locations on the bottom of the board for soldering optional PSRAM or flash memory chips.
- On/Off Pin — For connecting a pushbutton to control power state (hold 4 seconds to power off, press briefly to power on).
Understanding the Two Programs on Your Teensy
Every Teensy contains two programs:
- Your User Program — This is the code you write and upload. On a brand-new board, this is a simple LED blink program.
- The Bootloader — This is a special program stored on a separate chip that handles uploading new code. You enter bootloader mode by pressing the Program button.
The bootloader is stored on a dedicated chip, completely separate from your program. This means you can never accidentally erase or damage the bootloader — the Teensy can always be reprogrammed, even if you upload code that crashes.
📌 Pinout Reference
The Teensy 4.1 has 55 total I/O pins. When used on a breadboard, 42 pins are accessible along the two outer edges. Additional pins are available as SMT pads on the bottom of the board.
A double-sided pinout reference card is included with every Teensy 4.1, and are printed below:

You can also download printable versions from PJRC:
Pin Capabilities Summary
| Function | Pins | Notes |
|---|---|---|
| Digital I/O | All 55 pins | 3.3V output, not 5V tolerant |
| PWM Output | 35 pins | 22 independent frequency groups |
| Analog Input | 18 pins | Up to 12-bit resolution (10-bit usable) |
| Serial (UART) | 8 ports | All have FIFOs for high-speed performance |
| SPI | 3 ports | First port has FIFO for faster transfers |
| I2C | 3 ports | Supports 100, 400, and 1000 kbit/sec |
| CAN Bus | 3 ports | 1 port supports CAN-FD |
| I2S/TDM Audio | 2 ports | Up to 16 channels per pin using TDM |
| S/PDIF | 1 input, 1 output | Independent of I2S ports |
| LED | Pin 13 | Orange LED, active HIGH |
Important Pin Notes
- All pins are 3.3V only. Do not connect 5V signals directly to any pin.
-
Pin 13 has the onboard orange LED connected. When using pin 13 as an input, the external signal must be able to drive the LED. Do not use
INPUT_PULLUPwith pin 13. -
All digital pins support interrupts via
attachInterrupt(). -
All digital pins have optional pullup, pulldown, or keeper resistors, configured with
pinMode(). - Recommended maximum output current per pin is 4mA (output HIGH is 3.3V).
🚀 Getting Started
Step 1: Plug In Your Teensy
Connect the Teensy 4.1 to your computer using a USB Micro-B cable. All brand-new Teensy boards come with an LED blink program pre-loaded — you should see the orange LED on pin 13 blinking slowly (1 second on, 1 second off).
If the LED doesn't blink, check that your USB cable is a data cable (not charge-only) and try a different USB port.
Step 2: Install Arduino IDE
Download and install the Arduino IDE from arduino.cc. Version 2.3.0 or later is recommended.
Step 3: Install the Teensy Boards Add-on
- Open Arduino IDE.
- Go to File > Preferences (on macOS: Arduino IDE > Settings).
- In the "Additional boards manager URLs" field, paste this URL:
https://www.pjrc.com/teensy/package_teensy_index.json - Click OK.
- Open the Boards Manager by clicking the board icon on the left sidebar.
- Search for "teensy".
- Click Install on the Teensy package.
This installs the Teensyduino add-on, which includes the Teensy Loader application and a large collection of optimized libraries.
Step 4: Select Your Board
- Go to Tools > Board and select Teensy 4.1 from the Teensy section.
- Go to Tools > Port and select the port that corresponds to your Teensy.
- Leave Tools > USB Type set to Serial (the default) for now.
- Leave Tools > CPU Speed set to 600 MHz (the default).
Step 5: Upload Your First Program
Let's upload the classic LED blink sketch to confirm everything is working:
- Go to File > Examples > 01.Basics > Blink.
- Click the Upload button (right arrow icon).
- The Arduino IDE will compile your code and the Teensy Loader will automatically upload it to your board.
- You should see the orange LED blinking — confirming that your setup is working correctly.
💡 Tip: If the upload doesn't start automatically, press the Program button on the Teensy to manually enter bootloader mode. The red LED will glow dimly, indicating the bootloader is ready to receive code.
💻 Example Code
Example 1: LED Blink (Basic)
This is the simplest possible Teensy program — it blinks the onboard LED on pin 13.
// Teensy 4.1 — LED Blink
// Blinks the onboard orange LED on Pin 13
const int ledPin = 13;
void setup() {
pinMode(ledPin, OUTPUT);
}
void loop() {
digitalWrite(ledPin, HIGH); // LED on
delay(1000); // Wait 1 second
digitalWrite(ledPin, LOW); // LED off
delay(1000); // Wait 1 second
}
Example 2: Serial Monitor Communication
This example demonstrates sending data from the Teensy to your computer via USB Serial. Open the Arduino Serial Monitor (Tools > Serial Monitor) after uploading.
// Teensy 4.1 — Serial Monitor Example
// Prints a message and the board's uptime to the Serial Monitor
void setup() {
Serial.begin(9600); // Baud rate is ignored on Teensy USB Serial
// but included for Arduino compatibility
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
Serial.print("Teensy 4.1 is running. Uptime: ");
Serial.print(millis() / 1000);
Serial.println(" seconds");
digitalWrite(13, LOW);
delay(2000);
}
💡 Note: On Teensy, USB Serial runs at full USB speed regardless of the baud rate setting. The
Serial.begin(9600)line is included for compatibility but the actual transfer speed is much faster.
Example 3: Reading an Analog Sensor
This example reads an analog value from pin A0 (pin 14) and prints it to the Serial Monitor. You can connect a potentiometer or any analog sensor to test this.
// Teensy 4.1 — Analog Read Example
// Reads analog input on pin A0 and prints the value
const int sensorPin = A0; // Pin 14 on Teensy 4.1
void setup() {
Serial.begin(9600);
analogReadResolution(10); // 10-bit resolution (0-1023)
// Hardware supports 12-bit, but 10-bit
// is more practical due to noise
}
void loop() {
int sensorValue = analogRead(sensorPin);
float voltage = sensorValue * (3.3 / 1023.0);
Serial.print("Raw: ");
Serial.print(sensorValue);
Serial.print(" Voltage: ");
Serial.print(voltage, 2);
Serial.println(" V");
delay(500);
}
⚠️ Important: The analog input range is fixed at 0 to 3.3V. The
analogReference()function has no effect on Teensy 4.1. Do not apply more than 3.3V to any analog pin.
📡 USB Device Types
One of the Teensy 4.1's most powerful features is its ability to appear as many different types of USB devices to your computer. This is configured in the Arduino IDE under Tools > USB Type.
| USB Type | Description | Typical Use |
|---|---|---|
| Serial | Appears as a COM port / serial device | General communication, debugging, data logging |
| Keyboard | Standard 104-key USB keyboard | Sending keystrokes to control software |
| Mouse | USB mouse with relative and absolute positioning | Custom pointing devices, digitizer pens |
| Joystick | Game controller with 6 axes, 32 buttons, hat switch | Flight sim panels, custom game controllers |
| MIDI | Class-compliant MIDI device | Music controllers, synthesizers, DAW integration |
| Audio | USB sound card (stereo in/out) | Audio processing with the Teensy Audio Library |
| MTP Disk | Media Transfer Protocol (like a phone/camera) | File sharing from SD card or flash |
| Raw HID | 64-byte message packets | Custom communication with PC software |
| Flight Sim | X-Plane flight simulator integration | Custom cockpit controls and instruments |
| Touchscreen | Multi-touch (up to 10 fingers) | Custom touch input devices |
Several USB types can be combined (e.g., "Serial + Keyboard + Mouse + Joystick") to create multi-function USB devices.
🔋 Memory Architecture
The Teensy 4.1 has a sophisticated memory system designed to keep the 600 MHz processor running at full speed. Here's a simplified overview:
| Memory Type | Size | Purpose |
|---|---|---|
| Flash (Program) | 8 MB (7936K usable) | Stores your compiled program code and read-only data |
| RAM1 (TCM) | 512K | Ultra-fast tightly coupled memory for code and variables |
| RAM2 | 512K | Optimized for DMA access — large arrays and buffers go here |
| EEPROM | 4284 bytes | Emulated non-volatile storage for settings and calibration data |
| QSPI (optional) | Up to 16MB | External PSRAM or flash chips soldered to the bottom of the board |
Memory Keywords
The Teensy toolchain provides special keywords to control where your variables and functions are placed in memory:
-
DMAMEM— Place large arrays and buffers in RAM2, freeing up the faster RAM1 for normal variables. -
EXTMEM— Place variables in the optional external PSRAM chip (if installed). -
PROGMEM/F()— Place read-only data in flash memory only. -
FASTRUN— Place functions in RAM1 for fastest execution (this is the default for most functions). -
FLASHMEM— Place functions in flash memory (slower, but saves RAM1 space — good for setup code).
Adding PSRAM (Memory Expansion)
The bottom of the Teensy 4.1 has two sets of pads for optional QSPI memory chips:
- Smaller pads: Accept an 8MB PSRAM chip. If you're only adding one chip, it must go here.
- Larger pads: Accept certain flash memory chips supported by the LittleFS library.
Adding PSRAM requires surface-mount soldering skills. The PSRAM is accessed using the EXTMEM keyword or extmem_malloc() function.
💾 Using the MicroSD Card
The Teensy 4.1 has a built-in microSD card socket on the underside of the board. It uses the fast 4-bit native SDIO protocol, which is significantly faster than the SPI-based SD card access used on most Arduino boards.
Basic SD Card Usage
// Teensy 4.1 — SD Card Read/Write Example
#include <SD.h>
void setup() {
Serial.begin(9600);
while (!Serial) { } // Wait for Serial Monitor
Serial.print("Initializing SD card... ");
if (!SD.begin(BUILTIN_SDCARD)) {
Serial.println("SD card initialization failed!");
return;
}
Serial.println("SD card initialized.");
// Write a file
File myFile = SD.open("test.txt", FILE_WRITE);
if (myFile) {
myFile.println("Hello from Teensy 4.1!");
myFile.close();
Serial.println("File written successfully.");
}
// Read the file back
myFile = SD.open("test.txt");
if (myFile) {
Serial.println("File contents:");
while (myFile.available()) {
Serial.write(myFile.read());
}
myFile.close();
}
}
void loop() {
// Nothing here
}
💡 Tip: Always use
SD.begin(BUILTIN_SDCARD)to access the built-in SD socket. This uses the fast 4-bit SDIO interface. Using a pin number instead would fall back to the slower SPI protocol.
🔋 Power
Powering the Board
- USB Power (default): The Teensy is normally powered through the USB cable from your computer or a USB power supply. Power arrives at the VUSB pin, which is connected to VIN.
- VIN Pin: When USB is not connected, you can apply 5V to the VIN pin. Do not apply power to VIN while USB is connected, unless you cut the VUSB-VIN trace on the bottom of the board.
- 3.3V Regulator: An onboard regulator converts the 5V input to 3.3V for the processor and peripherals. You can draw up to 250mA from the 3.3V pin for external circuits.
Power Consumption
- Approximately 100 mA at 600 MHz.
- Reducing CPU speed (via Tools > CPU Speed) reduces power consumption.
- At 24 MHz, the CPU runs on only 0.95V, significantly reducing power draw.
On/Off Control
The Teensy 4.1 has a dedicated On/Off pin for low-power or battery-operated projects:
- Connect a pushbutton between the On/Off pin and GND.
- Hold 4 seconds while running to turn off the 3.3V power supply.
- Press briefly (0.5 seconds) while off to turn power back on.
- If a coin cell is connected to VBAT, the power state is remembered when main power is disconnected.
VBAT (Battery Backup)
Connect a CR2032 coin cell between the VBAT and GND pads to keep the Real-Time Clock running while the board is powered off. The RTC will maintain accurate date and time, and 16 bytes of battery-backed RAM (registers LPGPR0–LPGPR3) will be preserved.
📊 Specifications
| Processor | NXP IMXRT1062 (ARM Cortex-M7) |
| Clock Speed | 600 MHz (overclockable to 912 MHz) |
| Architecture | Dual-issue superscalar, branch prediction, 32K+32K cache |
| Floating Point Unit | Hardware 32-bit (float) & 64-bit (double) |
| Flash Memory | 8 MB (7936K usable for programs) |
| RAM | 1024K total (512K tightly coupled + 512K DMA-optimized) |
| EEPROM | 4284 bytes (emulated) |
| Digital I/O Pins | 55 total (42 breadboard-friendly) |
| PWM Outputs | 35 |
| Analog Inputs | 18 (up to 12-bit resolution, 10-bit usable) |
| Serial Ports (UART) | 8 (all with FIFOs) |
| SPI Ports | 3 |
| I2C Ports | 3 (100/400/1000 kbit/sec) |
| CAN Bus | 3 (1 with CAN-FD) |
| USB Device | 480 Mbit/sec (High Speed) |
| USB Host | 480 Mbit/sec (High Speed) |
| Ethernet | 10/100 Mbit with DP83825 PHY (standard variant) |
| SD Card | MicroSD socket, 4-bit native SDIO |
| Digital Audio | 2× I2S/TDM + 1× S/PDIF in + 1× S/PDIF out + MQS |
| DMA Channels | 32 general purpose |
| Timers | 4 interval timers, 32 PWM timers, 4 quadrature encoders, RTC |
| Security | Cryptographic acceleration, random number generator, code security (Lockable variant) |
| Operating Voltage | 3.3V (onboard regulator from 5V USB/VIN) |
| I/O Voltage | 3.3V (not 5V tolerant) |
| Max Output Current (per pin) | 4 mA recommended |
| Max 3.3V External Load | 250 mA |
| Power Consumption | ~100 mA at 600 MHz |
| Board Dimensions | Approx. 61 × 18 mm (2.4 × 0.7 inches) L × W |
| Regulatory Compliance | FCC, ISED, CE, UKCA, RoHS, REACH |
🛠️ Troubleshooting
| Problem | Possible Cause | Solution |
|---|---|---|
| LED doesn't blink on new board | Bad USB cable or port | Try a different USB cable (make sure it's a data cable, not charge-only). Try a different USB port or computer. |
| Teensy not recognized by Arduino IDE | Teensyduino not installed | Install the Teensy boards add-on via Boards Manager using the PJRC JSON URL (see Getting Started, Step 3). |
| Upload fails or hangs | Board not in bootloader mode | Press the Program button on the Teensy to manually enter bootloader mode. The red LED should glow dimly. |
| Serial Monitor shows nothing | Wrong port selected, or code doesn't use Serial | Check Tools > Port. Make sure your code includes Serial.begin() and Serial.print() statements. Try adding while (!Serial) { } in setup() to wait for the connection. |
| Analog readings are noisy or inaccurate | Noise, floating pin, or 5V signal | Ensure the signal is 0–3.3V. Use a low-impedance source. Consider averaging multiple readings. Use 10-bit resolution (the practical limit). |
| Board appears "bricked" or unresponsive | Bad code uploaded | Press and hold the Program button for 15 seconds (between 13–17 seconds). This performs a Memory Wipe, erasing all code and restoring the LED blink program. The red LED will flash to indicate the erase window. |
| SD card not detected | Wrong initialization or bad card | Use SD.begin(BUILTIN_SDCARD) — not a pin number. Try a different SD card. Make sure the card is properly seated in the socket. |
| 5V device not working with Teensy | Voltage mismatch | Teensy 4.1 is 3.3V only and not 5V tolerant. Use a level shifter between the Teensy and any 5V device. |
Memory Wipe & LED Blink Restore
If your Teensy becomes completely unresponsive due to bad code, you can perform a full memory wipe:
- Press and hold the Program button.
- The red LED will flash briefly after about 13 seconds — this marks the beginning of the erase window.
- Continue holding until the red LED turns on bright (flash is being erased).
- Release the button after the red LED turns off (around 17 seconds total).
- The Teensy will reboot and run the built-in LED blink program.
This erases all non-volatile memory and restores the factory LED blink program. Your bootloader is never affected — it's on a separate chip.
🔌 Compatible With
- Arduino IDE 2.x (with Teensyduino boards add-on via Boards Manager)
- Arduino IDE 1.8.x (with Teensyduino installer — Windows and Linux only)
- PlatformIO IDE (Windows, Mac, Linux)
- Visual Micro for Microsoft Visual Studio (Windows only, commercial)
- CircuitPython (partial hardware support)
- PJRC Audio Shield (Rev D)
- SmartLED Shield v5 for HUB75 RGB LED panels
- Standard solderless breadboards
🎯 Common Applications
- Audio Processing — Multi-channel audio synthesis, effects processing, and streaming using the Teensy Audio Library and Audio Shield.
- LED Installations — Drive thousands of WS2812B/NeoPixel LEDs at video refresh rates using the OctoWS2811 library, or large HUB75 RGB panels with SmartMatrix.
- Data Logging — High-speed data acquisition to the built-in microSD card using native SDIO.
- Networked Devices — Ethernet-connected IoT controllers, web servers, and networked sensors.
- Automotive & Industrial — CAN Bus communication for vehicle diagnostics, industrial control, and automation.
- Custom USB Devices — Build keyboards, MIDI controllers, joysticks, flight sim panels, and other HID devices.
- Signal Processing — Real-time DSP, FFT analysis, and digital filtering using the hardware DSP instructions.
- Robotics — Multi-axis motor control with 35 PWM channels, sensor fusion, and real-time control loops.
- DMX Lighting — Control DMX lighting fixtures using any of the 8 serial ports.
- Commercial Products — Secure embedded systems using the Lockable variant with encrypted firmware updates.
🏪 Where to Buy
The Teensy 4.1 and compatible accessories are available at Envistia Mall.
- 📦 Fast US Shipping
- 🔄 Hassle-Free Returns
- 📧 Responsive Customer Support
📚 Additional Resources
- PJRC Teensy 4.1 Official Product Page — Full specifications, photos, schematic, and technical details.
- Teensy Model Comparison Table — Compare specifications across all Teensy models.
- Teensyduino Download & Installation — Software setup instructions for all platforms.
- Teensyduino Libraries — Complete list of libraries included with Teensyduino.
- PJRC Forum — Active community forum for technical questions, project ideas, and troubleshooting.
- Teensy Audio System Design Tool — Visual tool for designing audio processing systems.
- NXP IMXRT1060 Reference Manual (with PJRC annotations) — Detailed processor documentation.
This user guide is provided by Envistia Mall for informational purposes. While we strive for accuracy, specifications and features may change without notice. Always refer to the manufacturer's official documentation for the most current information. The manufacturer and Envistia LLC (dba Envistia Mall) are not responsible for any damages or losses resulting from the use of this product. Always follow proper electrical safety practices when working with electronic components.