What am I doing wrong? Silly mistake?

I know pin 3 output is working…
This works as expected measuring with LED or voltmeter:

void setup() {
pinMode(3,OUTPUT);
digitalWrite(3,HIGH);
delay(2000);
digitalWrite(3,LOW);
delay(2000);
digitalWrite(3,HIGH);
delay(2000);
digitalWrite(3,LOW);
delay(2000);
}
void loop() {}

I have modified this demo a bit, 3 → 333, and moving the delay
I did this as a test to see if I can measure the output on pin 3 with LED or voltmeter
Nothing. It’s stuck at 0V.
Am I losing my mind?
Please help!

/*
 * IRremote: IRsendDemo - demonstrates sending IR codes with IRsend
 * An IR LED must be connected to Arduino PWM pin 3.
 * Version 0.1 July, 2009
 * Copyright 2009 Ken Shirriff
 * http://arcfn.com
 */
#include <IRremote.h>
IRsend irsend;
void setup()
{
}
void loop() {
  if (Serial.read() != -1) {
    for (int i = 0; i < 333; i++) {
      irsend.sendRC5(0x01, 12);
      //delay(100);
    }
  }
delay(5000);
}

Edit:
I figured it out as soon as I posted it.
Go ahead laugh at me!

Go ahead laugh at me!

Why should we laugh at someone who definitely is learning from his/her mistakes?

It's funny how the problem is right in front of your eyes, but you can't see it... Now it works wonderfully at controlling the TV! When you press a key.

The transmission code is inside an 'if' statement, which means it will only run if the 'if's condition is evaluated to true. The condition, "Serial.read() != -1", is only true when arduino gets a character from the serial port (or, saying another way, when "someone" sends a character to arduino through the serial port).

You win a prize! It took me nearly an hour to figure that out. I bet you got it immediately...