Source: https://mokxi.com/learn/path/infrared-remotes
Updated: 2026-11-20

All paths

# IR remotes and protocols

How a remote control really works, on the Uno: a 38 kHz carrier that a tuned receiver picks out of a bright room, NEC read by hand and with IRremote, sending to a pretend TV, a learning remote, repeat codes, and a universal remote that translates between brands.

Arduino Uno R3 Free 7 lessons 6 h 4 chapters 2,433 XP Embedded engineering · Intermediate +150 XP

0 of 7 done

Start the course free Carriers and light Lesson plan for teachers

What you will build

## 3 projects, built step by step

7 lessons in 4 chapters, about 6 hours on a simulated Arduino Uno R3. Free, in your browser, every step checked by the simulator.

Chapter 1 project

### The NEC protocol

No library: an Uno times every burst and gap from the handset, finds the 9 ms leader, reads thirty-two bits least significant first, checks the inverted bytes and names the key.
Open it in the simulator

Chapter 2 project

### Sending

A second Uno joins as a pretend TV with an LCD for a screen. Two buttons and the infrared LED make a remote: IrSender builds NEC frames at 38 kHz, and the TV changes channel.
Open it in the simulator

Chapter 3 project

### Repeat codes

The TV side of holding a key: repeat frames every 110 ms ramp the volume, channels step once per press, a let-go is noticed when the repeats stop, and one prop shows what life is like without them.
Open it in the simulator

The map

## Chapter by chapter

Each lesson opens when the one before it is done, and each chapter ends in a project.

Chapter 1

## Light and the NEC protocol

The carrier, the receiver that inverts, and a frame read by hand.

Open 249 XP

### Carriers and light

An infrared LED aimed at a VS1838B, lit three ways: steady, at 38 kHz and at 56 kHz. Only one gets through, and the reason is the whole trick of every remote control.

0 of 7 steps

Start What is in it

Project Locked 498 XP

### The NEC protocol

No library: an Uno times every burst and gap from the handset, finds the 9 ms leader, reads thirty-two bits least significant first, checks the inverted bytes and names the key.

0 of 7 steps

5 questions, graded as you go.

Chapter 2

## Decoding and sending

IRremote reads the handset, then an Uno becomes the remote.

Locked 249 XP

### Decoding with IRremote

The IRremote library does in the background what the last lesson did by hand: a mission console where each number key flies to a planet and the LCD shows the light-minutes from the Sun.

0 of 7 steps

Project Locked 498 XP

### Sending

A second Uno joins as a pretend TV with an LCD for a screen. Two buttons and the infrared LED make a remote: IrSender builds NEC frames at 38 kHz, and the TV changes channel.

0 of 7 steps

4 questions, graded as you go.

Chapter 3

## Learning and repeats

Copy a code from any remote, and tell a press from a hold.

Locked 218 XP

### A learning remote

Press LEARN, point the handset and press a key: the Uno keeps the frame, and PLAY sends it to the TV out of its own LED. Plus why a board must stop listening while it talks.

0 of 6 steps

Project Locked 472 XP

### Repeat codes

The TV side of holding a key: repeat frames every 110 ms ramp the volume, channels step once per press, a let-go is noticed when the repeats stop, and one prop shows what life is like without them.

0 of 6 steps

4 questions, graded as you go.

Chapter 4

## Boss project

A universal remote: NEC in, another brand out.

Locked 249 XP

### Boss: a universal remote

A TV of another brand that speaks Samsung and ignores the kit handset. The Uno in between translates: a key table, Samsung repeats for held keys, a movie-night macro, and a key you map yourself.

0 of 7 steps

3 questions, graded as you go.

Syllabus

## Every lesson in the course

All 7 lessons, in order, each with what it covers. Any of them opens in the editor right away.

Chapter 1

### Light and the NEC protocol

- Carriers and light An infrared LED aimed at a VS1838B, lit three ways: steady, at 38 kHz and at 56 kHz. Only one gets through, and the reason is the whole trick of every remote control.
- The NEC protocol No library: an Uno times every burst and gap from the handset, finds the 9 ms leader, reads thirty-two bits least significant first, checks the inverted bytes and names the key.

Chapter 2

### Decoding and sending

- Decoding with IRremote The IRremote library does in the background what the last lesson did by hand: a mission console where each number key flies to a planet and the LCD shows the light-minutes from the Sun.
- Sending A second Uno joins as a pretend TV with an LCD for a screen. Two buttons and the infrared LED make a remote: IrSender builds NEC frames at 38 kHz, and the TV changes channel.

Chapter 3

### Learning and repeats

- A learning remote Press LEARN, point the handset and press a key: the Uno keeps the frame, and PLAY sends it to the TV out of its own LED. Plus why a board must stop listening while it talks.
- Repeat codes The TV side of holding a key: repeat frames every 110 ms ramp the volume, channels step once per press, a let-go is noticed when the repeats stop, and one prop shows what life is like without them.

Chapter 4

### Boss project

- Boss: a universal remote A TV of another brand that speaks Samsung and ignores the kit handset. The Uno in between translates: a key table, Samsung repeats for held keys, a movie-night macro, and a key you map yourself.

Kits

## Build it on your bench too

Every lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.

Have a kit already?

### Find your kit

Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.
See every kit

Questions

## About IR remotes and protocols

Is IR remotes and protocols free?

Yes. All 7 lessons of IR remotes and protocols are free and run in your browser, with nothing to install and no parts to buy before you start.

Do I need a real Arduino Uno R3?

No. Every lesson runs on a simulated Arduino Uno R3 with its parts on the canvas, and the simulator checks each step as you go. When you want to build it for real, the same wiring and code work on a real board.

How long does IR remotes and protocols take?

About 6 hours: 7 lessons in 4 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.

What will I build?

Each chapter ends in a project that puts it together: The NEC protocol, Sending and Repeat codes.

Where do I start?

With "Carriers and light", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.
