About Teensy 4.0
Teensy 4.0 is a compact, high-performance Arduino-compatible board released by PJRC. Despite its extremely small size (approximately 36mm x 18mm), it offers outstanding performance that stands well above other Arduino-compatible boards.![]() |
| Teensy 4.0 |
The board comes with a pinout reference card included in the package.
![]() |
| Teensy 4.0 Package |
Teensy 4.0 Specifications
As shown in the comparison below, both the CPU frequency and Flash/SRAM capacity are very impressive.For more details, please refer to the official product page. A notable feature that distinguishes Teensy 4.0 from other boards is its SD card interface, which uses SDIO (4-bit) instead of the typical SPI connection.
Arduino Environment
To use Teensy with the Arduino environment, you need to install Teensyduino.Follow the instructions on the Teensyduino download page.
Note that there are restrictions on the supported Arduino versions. In my case, version 1.8.10 was not supported, so I updated to version 1.8.12.
The library location in the Arduino environment is:
- C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries
For example, the Arduino setup() and loop() functions are defined in:
- C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\main.cpp
Pin definitions can be found at:
- C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4\pins_arduino.h
The CPU speed can be configured via Tools -> CPU Speed in the Arduino IDE.
![]() |
| CPU Speed Configuration |
VS Code - PlatformIO Environment
For larger projects, the Arduino environment can become cumbersome. In such cases, you can use the Visual Studio Code - PlatformIO environment instead.
Please refer to the PlatformIO documentation for setup instructions.
Note that Teensyduino must also be installed when using the VS Code - PlatformIO environment.
The PlatformIO project structure can be set up by referring to the examples folder in platformio/platform-teensy (GitHub).
With the VS Code - PlatformIO environment, you will also primarily build using the Arduino framework.
On Windows, the library locations are as follows:
- %USERNAME%\.platformio\packages\framework-arduinoteensy
- %USERNAME%\.platformio\packages\framework-arduinoteensy\cores\teensy4
- %USERNAME%\.platformio\platforms\teensy
The CPU frequency can be configured in the platformio.ini file of each project.
[env:teensy40] platform = teensy framework = arduino board = teensy40 upload_protocol = teensy-gui board_build.f_cpu = 600000000L
Additional Resources
- Board Schematic : "Teensy 4.0 Schematic"
- SoC Documentation : "IMXRT1060 Manual" and "IMXRT1060 Datasheet"




No comments:
Post a Comment