NEC IR Remote Decoder

On an Arduino Nano 33 BLE, decode NEC infrared remote frames by measuring edge times yourself: check the inverted bytes, discard broken frames, switch a light and a fan, and handle held-key repeat codes.

Board
Nano 33 BLE · Arduino
Difficulty
Hard
Topic
Advanced Peripherals
Access
Full plan

The task

NEC IR Remote Decoder

A ceiling-fan maker ships a small infrared remote with each fan. The receiver board must decode the remote's NEC frames itself (no library), switch the light and the fan, and handle the remote's "button held" repeat codes for the speed key. Other remotes in the room use the same protocol with other addresses and must be ignored.

Hardware

  • Arduino Nano 33 BLE (nRF52840, 3.3 V logic). Serial console on Serial1 (D0/D1), 115200 baud. Serial is USB and is not seen by the tests.
  • D2: IR receiver module output (demodulated, idle HIGH, LOW while infrared light is received). Use the internal pull-up.
  • D4: LIGHT relay, D5: FAN relay, D6: SPEED-UP indicator LED (with a series resistor to GND), all HIGH = on.

This is the opening of the task. Sign in with the full plan to read the rest and solve it.

What you get

  • Your firmware is built and run on an emulated board and checked by hardware-level tests.
  • A written walkthrough of the solution.
  • No development board or local toolchain needed.

New to embedded? Start with the roadmap: How to learn embedded systems