Electronics Bash – Arduino #8- Remote Control with Infrared

In this stream, we’ll be looking at:

  • Controlling the Arduino with an Infrared remote control, either a “basic” one (pictured above) or any old TV remote.
  • Using the Arduino to control Infrared devices (TV’s, stereos, LED candles, etc)

This is the space where I’ll be posting code samples and circuit layouts sometime in advance of the stream, for those who want to follow along more directly. You can expect the code and formatting here to change up to a couple hours before the stream as the plan for the evening comes together.

Infrared Code

IRlib2

This week we’ll be making extensive use of the IRlib2 Arduino library to both receive commands from an infrared remote control, and to send commands back our to infrared devices. You can download the library from its GitHub page by clicking on Clone or Download in the upper-right corner. You can add this library to your sketch in the Arduino IDE by selecting Sketch > Include Library > Add .Zip Library from the menus, and selecting the downloaded Zip file.

Examples

We’ll be making use of a number of the examples that come with the IRLib2 library this week, namely the dump, send, rawRecv, and rawSend examples. These will be our starting point for exploring IR transmission and reception.

LCD_RGB

We’ll modify the code we finished with last week to control an RGB LED with our infrared remote, and display the levels of the red, green, and blue components on an LCD screen

Show Code

 

LCD_RGB_Type

We’ll further modify our setup by adding the number keys to our remote,  allowing the user to “type” in a specific value for the red, green, and blue values

Show Code

 

DVD_Control_Raw.ino

We demonstrate the capture and replay of raw timing values to capture parameters from an unknown remote, to replay its value back into a DVD player.

Show Code

 

DVD_Control_Values.ino

We demonstrate capturing decodable values from a remote, and playing them back to control the DVD player from the Arduino.

Show Code

 

LED Candles

We’ll walk through the code used to read a DMX input and transmit IR commands to control a series of candles. Hopefully we can do this as a physical demo as well…

IR-Sketch.ino

Show Code

Show Code

Dmx-Receive.ino