Infrared(IR) Receiver and Remote Control

this is a test


hi

hello



What is Infrared and how is it used?

Infrared is basically a color our eyes can’t see but is around us everywhere. Infrared is used in many different products. It’s used in telescopes to see distant planets and gases. Weather satellites use infrared to show us images of storms. Infrared is also used in night vision to see things in the dark.

In the IR Receiver module and remote control, infrared is used to communicate between the remote control and the IR Receiver.  The invisible infrared light emits from the remote control when a button is pressed. This light turns on and off very fast. The IR Receiver has a light sensor which can see these light flashes and then converts those pulses into information. Since an infrared module must ‘see’ the invisible light it only works within the same room. IR light does not go through walls.

 

Setup:  You will need a BrainPad Pulse or BrainPad Tick, the BrainPad IR Module, and the IR remote control.

Connect the BrainPad as shown in the diagram.

 

 

 

Each time the button on the remote control is pressed a new number is sent to the IR receiver which the BrainPad uses in the code the user creates. In our code example, the BrainPad buzzer will make a sound and display the ‘Return Code’ of the button pressed. As long as the number received isn’t ‘100’, which means nothing was pressed.

 

 

 

 

 

var sound = Sound("builtin", 0.2, 80)
var ir = Infrared("P8");

while (true) {
var i = In(ir);


if (i != 100) {
Out(sound, 1000);
Print(i);
}
Wait(0.5);
}
var sound = Sound("builtin", 0.2, 80);
var ir = Infrared("P8");


while (true) {
var i = In(ir);


if (i != 100) {
Out(sound, 1000);
Print(i);
}
Wait(0.5);
}

var sound = Sound("builtin", 0.2, 80);
var ir = Infrared("P8");


while (true) {
var i = In(ir);


if (i != 100) {
Out(sound, 1000);
Print(i);
}
Wait(0.5);
}

Summary:

What other technologies use IR? Can you think of any ways to program the remote to do different things?

Lessons are under development. Contact us to join the other teachers writing lessons.
Newsletter

Twitter Feed
Hot off the press!
December 19, 2019
October 11, 2019
September 26, 2019
August 23, 2019
August 7, 2019
August 5, 2019