Teensy 4.1 gives nothing in the Serial Monitor with Serial.println

h3oCharles

New member
oh hi,

i have a Teensy 4.1 that does not give me anything in the Serial Monitor

- the Teensy 4.1 has been purchased on 17.03.2023 from a 3rd party retailer
- nothing is wired in currently
- OS is Windows 10 Pro 22H2

what i have done:
1. i plugged the microcontroller, the blink program was running correctly
2. tapping the built-in button stopped the blink program
3. downloaded and installed Arduino IDE 2.0.4
4. gave the Additional board manager URL and let it install as instructed in https://www.pjrc.com/teensy/td_download.html
5. set the USB Type to Serial
6. uploaded the hello world code in https://www.pjrc.com/teensy/td_serial.html , being:
Code:
void setup() {
  Serial.begin(9600); // USB is always 12 or 480 Mbit/sec
}

void loop() {
  Serial.println("Hello World...");
  delay(1000);  // do not print too fast!
}
7. the ouput only displays memory usage stuff:
Code:
Memory Usage on Teensy 4.1:
  FLASH: code:10700, data:2968, headers:8856   free for files:8103940
   RAM1: variables:3488, code:8032, padding:24736   free for local variables:488032
   RAM2: variables:12384  free for malloc/new:511904
8. opening the IDE's Serial Monitor displays nothing, it is set to 9600 baud, here's a screenshot, tho I'm sure if it will help
c7Vrg1W.png


what have i done wrong? did i not install the teensyduino addon correctly? how can i check that?
if needed, i can make screenshots and videos of whatever that's needed

also:
- i rebooted the pc once and tried hello world code, and still nothing outputs
- i have two java installs, is that bad? the main one is the newer one, here's "java -version" written in cmd:
Code:
java -version
java version "17.0.1" 2021-10-19 LTS
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)

interestingly, when I set the USB Type to Keyboard and run this code, everything runs as intended:
Code:
void setup() {
  // put your setup code here, to run once:

  #include <print.h>
  #include <usb_keyboard.h>
  #include <keyboard.h>
  Serial.begin(9600);

  // Bit numbers for each led - used to make it easier later to know what you were actually testing for...
  #define USB_LED_NUM_LOCK 0
  #define USB_LED_CAPS_LOCK 1
  #define USB_LED_SCROLL_LOCK 2
  #define USB_LED_COMPOSE 3
  #define USB_LED_KANA 4  
}

void loop() {
  // put your main code here, to run repeatedly:
  
  // This part should go inside your code where you want to test the state of the caps lock led
  if (keyboard_leds & (1<<USB_LED_CAPS_LOCK)) // checks that the caps lock bit is set
  {
      // CapsLock is ON - put your "on" code here
      Keyboard.println("CapsLock is ON");
  }
  else
  {
      // CapsLock is OFF - put your "off" code here
      Keyboard.println("CapsLock is OFF");
  }
  delay(1000);
}
 
It works on mine:
Screenshot.png

Note: if it does not work, try to make sure it is trying to write to the Teensy port code and not the generic Arduino port code.

You should see it in the tools menu:
Screenshot1.png

Also should make sure that the teensy was actually programmed with the code. If it is a new one, I usually end up doing the Verify option, which just compiles the code and should bring up the Teensy app
Screenshot2.png
And then I go to the Teensy with that app visible and press the program button, which the Teensy apps should then show the teensy being programmed. After that as long as you program it with a USB type that includes the word Serial (and most of others as well), you should not need to press the program button.
 
This is the build console output:
Code:
7. the ouput only displays memory usage stuff:

To see the USB Serial output the Serial Monitor must be opened.

With the Teensy selected under: Tools / Port
On keyboard for IDE 2 hit: Ctrl + Shift + M
 
changing the serial port fixed it, thank you so much! <3
i was on COM1, when the port i was supposed to choose is COM4

I'm new to programming with Arduino boards, so I'm not surprised that I missed something this relatively obvious

EDIT:
This is the build console output:
Code:
7. the output only displays memory usage stuff:

To see the USB Serial output the Serial Monitor must be opened.

With the Teensy selected under: Tools / Port
On keyboard for IDE 2 hit: Ctrl + Shift + M
you can see in the provided screenshot i already opened the Serial Monitor
 
Last edited:
Great - glad the problem fixed and working now ...

Didn't get as far as clicking the screen shot to post ... though did wonder why the tiny words didn't look like the console output :)
 
Back
Top