Simple IR TX
Simple IR TX

Simple IR TX

Needed a quick wireless comms with minimal component and code.

Connecting the IR LED to TX and a PWM pin at 50% 63.5kHz was the transmitter. This only required 4 extra lines of code and no extra libraries.

The receiver is just a simple remote IR receiver from e.g. a TV. Hooked directly to the RX pin on an serial to USB adaptor. No code needed there.

Main downside is that it is slow. 300 baud worked reliably for me. This paired with a TOS link cable makes for low effort isolated link.

void setup() {
  // 62.5 kHz PWM on PIN 9
  TCCR1A = 0b00000001;
  TCCR1B = 0b00001001;
  pinMode(9,OUTPUT);
  analogWrite(9, 128);

  Serial.begin(300);
}

void loop() {
  Serial.println("Test");
  delay(1000);
}