Teensy 4.1 acted as it had been through a factory reset


We have a created this led dress which consist of 13 led strips controlled by a teensy. The whole setup is as follows:
A macbook is streaming LED values via Wifi using Cycling 74s Max software. The values are received by a Raspberry Pi 3 (in the LED dress) using Pure Data. The RPi also upack the values, and then send them via COMPORT to a Teensy 4.1. The Teensy write the values to the LED strips using OctoWS2811. Each LED strip is powered by a 5V reachargeable battery.
The setup has been working perfectly util recently. Suddenly the RPi lost contact with the Teensy. The Teensy did not show up on the RPi any more, and the orange LED on Teensy kept blinking. It was almost like when i power up a new teensy with the blink sketch.
We then uploaded the code once more to the Teensy, and now it works like a charm again.
But it would be a disaster if this happened during a performance, and i was hoping that someone could shed some light on what happened so we can avoid this problem in the future. Anyone experienced anything similar.
(The teensy is mounted inside a box, so should not be possible to touch anything and mess stuff up)
Pål Asle


  • skisse_kjole2c.ino
    4.8 KB · Views: 24
The Teensy has a LED Blink restore feature if you hold the program button down between 13 and 17 seconds. Is there a chance that this happened? It would also happen if the program pin was pulled low for this time window.

See here
See the section below
Memory Wipe & LED Blink Restore
Teensy 4.1 will fully erase its non-volatile memory and return the flash memory to a simple LED blink program if the program button is held between 13 to 17 seconds. The red LED flashes briefly at the beginning of this time window. During flash erase, the red LED is on bright. When completed, Teensy 4.1 will automatically reboot and run the LED blink program, causing the orange LED to blink slowly.
Last edited:
Thanks a lot!! I did not know that at all! It is of course possible that this could have happened even if the board is enclosed inside of a box.
No worries, I would hope it was just a strange accident that it was pressed between 13-17 seconds and not that something shorted the program pin for that amount of time.
Right, the button shorts (to GND) the trace that the program pin is connected to, so pressing the button and shorting the program pin to GND do the same thing. A quick press will put the Teensy into programming mode which will also stop your program but not erase it, so you will want to avoid even that happening. Making sure the button cannot be accidentally pressed and the program pin isn't shorting to GND should solve your issue if that is what happened originally.