How to create a 38 Khz pulse with arduino using timer or PWM?

can you help me with this code , which These Saying ,
I want to make a robot that dodge opstaculos with an LED that pulses of 38 khz

void IR38Write() {
for(int i = 0; i <= 384; i++) {
digitalWrite(IRledPin, HIGH);
delayMicroseconds(13);
digitalWrite(IRledPin, LOW);
delayMicroseconds(13);
}
}