IR Remote Wiring & Example Code

An IR receiver can detect bursts of infrared light sent by a common remote controller (like for a television), and then output a pattern of high/low signals to a Propeller I/O pin.

 

Wiring Diagram & Connections

Configure your remote for the Sony protocol, following its manufacturer instructions. (If you purchased the Brightstar brand remote from Parallax, hold the Setup button until the light near it comes on. Enter 6-0-5 and the light should go off. Done!)

 

Quick Example Code

Using the connections shown in the wiring diagram above, this example displays the number of the button pressed on your remote in the Terminal. When no button is pressed, the Sony Remote value block sends a -1, and the message Button press = none will appear in the Terminal.

Quick-start BlocklyProp code for the IR Remote.