Teensy 4.0 underperforming and orange led is dimmer than originally.

SonOfOdin

New member
We have ordered two Teensy 4.0s and seemingly randomly, it started to underperform. When writing to it, the red LED blinks with large gaps (as opposed to the fast, almost continuous light). Also, even with the most barebones program, the orange LED flashes dimly. With a more complex program, issues come up with serial connection stability.

C++:
#include <usb_serial.h>

bool ledState = true;
void setup(){
    digitalWrite(LED_BUILTIN,ledState);
    Serial.begin(9600);
    while (!Serial){}
}

int counter = 0;
void loop(){
    Serial.println(counter++);
    delay(50);
    ledState = !ledState;
    digitalWrite(LED_BUILTIN,ledState);
}
 
You are only pausing for 50ms, I would have thought that that would only make the led appear to be dimly lit.
Try changing it to 500ms (1/2 second) or larger and see what it looks like.
 
setup() should also have a call to pinMode()

Code:
void setup(){
    Serial.begin(9600);
    while (!Serial){}
    pinMode(LED_BUILTIN,OUTPUT);
    digitalWrite(LED_BUILTIN,ledState);
}
 
Back
Top