Skip to content

Instantly share code, notes, and snippets.


Keybase proof

I hereby claim:

  • I am eevblog on github.
  • I am eevblog ( on keybase.
  • I have a public key ASA_5vEYMnz6qLTT24KcAfR3AYQHJeteUiboGDSYETg6qQo

To claim this, I am signing this object:

EEVblog / Arduino-IR-TX-NEC
Last active Oct 6, 2021
A simple Arduino driver for the NEC (Japanese) Infrared IR protocol. Drive an IR LED direct with your own code. This is a direct pin bit-bang approach, so beware about interrupts and timing difference between hardware. Feel free to use hardware PWM to generate the carrier frequency if you want better accuracy.
View Arduino-IR-TX-NEC
// NEC (Japanese) Infrared code sending library for the Arduino
// Send a standard NEC 4 byte protocol direct to an IR LED on the define pin
// Assumes an IR LED connected on I/O pin to ground, or equivalent driver.
// Tested on a Freetronics Eleven Uno compatible
// Written by David L. Jones
// Youtube video explaining this code:
// License: Creative Commons CC BY