Infrared Remote Receiver

Learn about Sparki's Infrared Remote Receiver


Lessons You Should Know

Sparki has one infrared remote receiver that can receive commands by rapidly blinking infrared lights, like those with Sparki’s remote, or TV remotes. Remote_Top

How It Works

Infrared remotes work by sending codes via flashing lights. These lights flash really fast; Sparki’s remote flashes 38,000 times a second. By measuring the amount of time between each flashing, Sparki can tell if each burst is meant to be a 1 or a 0, known as bits: Signal Diagram Sparki counts these flashes until 32bits have been counted, then turns this into a number. Specifically, Sparki uses the NEC infrared code protocol.  

Using the Part

With the basic Sparki code in place, you can measure an infrared sensor by using this command: This command returns the last code that was sent to Sparki. It returns this number in the form of an integer. If there has not been a code sent since the last time Sparki ran this command, it will send back a -1. SparkiDuino already has code examples for you to use: File > Examples > Remote

Finally, you can try more complex programs using this receiver, such as Sparki’s Default Program.