Program a Teensy, and know what the pins do
A ThingDAQ is a Teensy running the ThingDAQ firmware. A board straight out of its packet is not one yet: it enumerates as a Teensy, the analyzer finds nothing to talk to, and nothing on the Connect screen explains why. This page is the part that happens before that screen is any use.
What you need
- A Teensy 4.0The board this firmware release is built and verified for. A Teensy 4.1 carries the same i.MX RT1062 and the same A0/A1 and D6–D13 pins, but no image here has been tested on one — build from the firmware repository if that is what you have. PJRC’s board page →
- A USB cable that carries dataA charge-only cable powers the board and enumerates nothing, which looks identical to a board that will not boot. If no port appears anywhere, suspect the cable first.
- The firmware imageThe .hex below. It is the exact file a ThingDAQ release published, digest and all.
Get the firmware
These are the exact bytes the release published — the digest above is checked against the release’s own on every build. Verify your copy with sha256sum if you like; nothing downstream assumes you did.
Put the board in its bootloader
A Teensy holds two programs: whatever you last loaded, and a small bootloader called HalfKay that never gets overwritten. Every loader below talks to HalfKay, not to the program — so the board has to be running HalfKay before anything can be written to it.
You get there by pressing and releasing the tiny pushbutton on the board. That is the Program button, and pressing it is the whole procedure: the board leaves your program, starts HalfKay, and waits.
Three ways to flash it
Teensy Loader
The graphical one, and the shortest path if you are doing this once. Download PJRC’s loader for your operating system, open the .hex in it, press the Program button on the board, and click the button in the window. It reports what it wrote.
PJRC: Step #2: The Teensy Loader Application →
teensy_loader_cli
The same loader without the window, which is what you want in a script or over ssh. --mcu is required and names the board; -w waits for the board to appear in HalfKay so you can start the command and then press the button.
teensy_loader_cli --mcu=TEENSY40 -w -v thingdaq-1.1.0-teensy40.hex
PJRC: Teensy Loader, Command Line →
Arduino IDE with Teensyduino
Worth installing if you intend to build the firmware yourself rather than flash a release — it is the toolchain the firmware is compiled with. For flashing a .hex alone it is the long way round, and the two loaders above do the same job.
Linux: install the udev rules first
The loaders reach the board over raw USB, which an ordinary user account is not allowed to do by default. Without the rule the loader fails with a permission error that never mentions udev, and the board looks broken.
Download 00-teensy.rules from PJRC, put it in /etc/udev/rules.d/, and tell udev to read it:
sudo cp 00-teensy.rules /etc/udev/rules.d/sudo udevadm control --reload-rules && sudo udevadm triggerCheck it worked
- Open the analyzer with a device source and click Start Capturing.
- Pick the board in the browser’s port picker.
- Open the DEVICE section in the right-hand rail and read the firmware version.
That version is not something this page knows — it arrives in the INFO_RESPONSE the board sends when the analyzer asks it what it is. A number there means the firmware is running and speaking the protocol this build was generated from. An empty section means the port opened and nothing answered, which is a board that is not running ThingDAQ.
What the pins do
Ten pins are claimed by every run: two analog inputs and the eight digital lanes, in the order the packed byte carries them. Bit 0 is D6 and bit 7 is D13 — that order is what stacks the lanes in the plot, top to bottom.
| Pin | Analog | Role | Notes |
|---|---|---|---|
| D14 | A0 | ADC0 | NXP ADC1 channel 7, 12-bit |
| D15 | A1 | ADC1 | NXP ADC2 channel 8, 12-bit |
| D6 | — | GPIO bit 0 | Bit 0 of the packed byte |
| D7 | — | GPIO bit 1 | Bit 1 of the packed byte |
| D8 | — | GPIO bit 2 | Bit 2 of the packed byte |
| D9 | — | GPIO bit 3 | Bit 3 of the packed byte |
| D10 | — | GPIO bit 4 | Bit 4 of the packed byte |
| D11 | — | GPIO bit 5 | Bit 5 of the packed byte |
| D12 | — | GPIO bit 6 | Bit 6 of the packed byte |
| D13 | — | GPIO bit 7 | Bit 7 of the packed byte — and the pin most Teensy boards tie their LED to |
| With the auxiliary bank on | |||
| D16 | — | GPIO bit 8 | 16-input mode only — bit 8 of the packed sixteen-bit level |
| D17 | — | GPIO bit 9 | 16-input mode only — bit 9 of the packed sixteen-bit level |
| D18 | — | GPIO bit 10 | 16-input mode only — bit 10 of the packed sixteen-bit level |
| D19 | — | GPIO bit 11 | 16-input mode only — bit 11 of the packed sixteen-bit level |
| D20 | — | GPIO bit 12 | 16-input mode only — bit 12 of the packed sixteen-bit level |
| D21 | — | GPIO bit 13 | 16-input mode only — bit 13 of the packed sixteen-bit level |
| D22 | — | GPIO bit 14 | 16-input mode only — bit 14 of the packed sixteen-bit level |
| D23 | — | GPIO bit 15 | 16-input mode only — bit 15 of the packed sixteen-bit level |
A board can be asked for sixteen inputs instead of eight, which adds a second bank on D16–D23 and makes each recorded instant a sixteen-bit word rather than one byte. The analyzer asks once, after a board that supports it connects; the inspector’s DEVICE panel changes the answer whenever the capture is stopped. These eight pins are ordinary GPIO until a run asks for them.
Every measurement is against the board ground. Tie one of the Teensy GND pins to the ground of whatever you are probing before you connect a signal — without a shared reference the readings are noise, and a ground offset can be worse than a wrong voltage.
This table is generated from the wire contract this site vendors, and the board states the same map itself: connect one, and the analyzer reads its pin map out of INFO rather than trusting anything printed here.
Flash from this browser
The panel below writes the image straight from this tab — the same HalfKay protocol the loaders above speak, over WebHID, with no download and nothing to install. It removes no step from the list above: the board still has to be in its bootloader, and the first flash still needs the button. What it removes is the install.
Program a board
- Version
- 1.1.0
- Release
- v1.1.0 · 2026-09-05
- Size
- 436.0 KB
- SHA-256
- 23b0f2ef8023…
- Bootloader
- Confirm
- Write
- Done
Program a board from this page
Checking what this browser can do. The flashing instructions list three desktop loaders that can, from any machine.
See also
With the firmware on and the probes clipped to the pins above, the analyzer’s own guide is the rest of it — the toolbar, the plot’s gestures, the six inspector panels, and what every figure in the status bar is counting.