🛠 Premiers pas sur le Teensy 4.1 : Teensyduino, Teensy Loader et premier Blink

Teensy 4.1 · debutant · Schéma : Teensy 4.1 vue de dessus (format long 2,4 × 0,7 pouce), avec la LED orange (broche 13), le bouton Program, la LED rouge du bootloader, le port micro-USB principal et le second port USB (hôte) ; à côté, la fenêtre Teensy Loader.

Objectives

Discover PJRC's "Swiss Army knife" board: the Teensy 4.1 uses the NXP i.MX RT1062 (600 MHz Cortex-M7, officially overclockable to 912 MHz) from the Teensy 4.0 in a longer form factor that unlocks 55 I/O pins, Ethernet, native SDIO, and a second USB port. This tutorial covers the basics: installing Teensyduino, uploading a Blink sketch, and understanding the board's key peculiarity — there is no hardware reset button.

Hardware

Installation and Uploading

  1. Install the official Teensy add-on via https://www.pjrc.com/teensy/td_download.html (supported alternatives: PlatformIO, Visual Micro, and the command-line Makefiles provided with the installer).
  2. In the IDE: Tools > Board > Teensy > Teensy 4.1, then Tools > USB Type > Serial.
  3. Click Upload: Teensy Loader launches automatically. If it does not detect the board, press the Program button once — this is NOT a reset button; it instructs the bootloader to enter USB programming mode.
  4. The dedicated red LED indicates the bootloader status: dim = waiting, bright = flash writing in progress.

Key architectural point: the bootloader resides in a physically separate chip (a GD32E230F8 on boards manufactured after June 2022). The 8 MB of main flash is 100% yours, and a failed upload cannot brick it. If your code is truly unresponsive, holding the Program button for 13 to 17 seconds erases all non-volatile memory and restores the fallback program (LED blinking). If the Program button is inaccessible, plan for software recovery: the board has no reset pin; only software reset (watchdog or SCB_AIRCR register) is available.

Complete Code

void setup {
  Serial.begin(9600);      // série USB : le baud rate est ignoré
  pinMode(13, OUTPUT);     // LED orange — JAMAIS en INPUT_PULLUP :
                           // la LED de la broche fausse la lecture
}

void loop {
  digitalWrite(13, HIGH);
  delay(150);
  digitalWrite(13, LOW);
  delay(850);
}

Expected Verification

The orange LED blinks once per second upon power-up — your code executes immediately at power-up, with no bootloader delay. The Serial Monitor (USB Type = Serial) displays what you send to it; your program starts faster than the monitor opens, hence the classic while (!Serial && millis < 3000); to avoid missing any messages.

Common Errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials