Arduino – Managing cheap IR remotes
(Download here :)
These remote controls are very cheap to buy, for example, on Ebay.
What you should know about them, to be issued at 38kHz signal
The
positions of the buttons are different, but they give the same signal
at the location.
There are contacts underneath the buttons on the left remote control, but only the top layers are not identical.
Disassembled it looks like they are the same inside.
The table below shows the sent sequence (8 digits).
Interpretation of two-digit numbers: Row, column.
For example, the top left button 11, the top right 13, the bottom right 73.
17 buttons: 21 buttons: Command: Assigned command:
11 CH- 16753245 11
12 ▲ 16736925 12 CH 16736925 12
13 CH+16756815 13
21 ◄ 16720605 21 |◄◄ 16720605 21
22 OK 16712445 22 ►►| 16712445 22
23 ► 16761405 23 ►|| 16761405 23
31 - 16769565 31
32 ▼ 16754775 32 + 16754775 32
33 EQ 16748655 33
41 1 16738455 41 0 16738455 0
42 2 16750695 42 100+ 16750695 100
43 3 16856815 43 200+ 16756815 200
51 4 16724175 51 1 16724175 1
52 5 16718055 52 2 16718055 2
53 6 16743045 53 3 16743045 3
61 7 16716015 61 4 16716015 4
62 8 16726215 62 5 16726215 5
63 9 16734885 63 6 16734885 6
71 * 16728765 71 7 16728765 7
72 0 16730805 72 8 16730805 8
73 # 16732845 73 9 16732845 9
#include <IRremote.h>
int RECV_PIN = 2; //Remote input
IRrecv irrecv(RECV_PIN);
decode_results results;
unsigned long tavparancs = 0; // Remote command
byte tavgomb = 255; // Remote pressed button
void taviranyito() //38kHz NEC coding format, upd6122 code
{
if (irrecv.decode(&results)) { // Remote signal processing
if (results.value != 0xFFFFFFFF) { // Repeat signal (not used yet)
tavparancs = results.value;
if (tavparancs == 16738455) tavgomb = 0; //0 _____________
if (tavparancs == 16724175) tavgomb = 1; //1 | |
if (tavparancs == 16718055) tavgomb = 2; //2 | 11 12 13 |
if (tavparancs == 16743045) tavgomb = 3; //3 | 21 22 23 |
if (tavparancs == 16716015) tavgomb = 4; //4 | 31 32 33 |
if (tavparancs == 16726215) tavgomb = 5; //5 | 0 100 200 |
if (tavparancs == 16734885) tavgomb = 6; //6 | 1 2 3 |
if (tavparancs == 16728765) tavgomb = 7; //7 | 4 5 6 |
if (tavparancs == 16730805) tavgomb = 8; //8 | 7 8 9 |
if (tavparancs == 16732845) tavgomb = 9; //9 |___________ |
if (tavparancs == 16750695) tavgomb = 100; //100+
if (tavparancs == 16756815) tavgomb = 200; //200+
if (tavparancs == 16753245) tavgomb = 11; //CH-
if (tavparancs == 16736925) tavgomb = 12; //CH
if (tavparancs == 16769565) tavgomb = 13; //CH+
if (tavparancs == 16720605) tavgomb = 21; //I<<I
if (tavparancs == 16712445) tavgomb = 22; //I>>I
if (tavparancs == 16761405) tavgomb = 23; //I>II
if (tavparancs == 16769055) tavgomb = 31; //-
if (tavparancs == 16754775) tavgomb = 32; //+
if (tavparancs == 16748655) tavgomb = 33; //EQ
Serial.print(tavparancs, DEC);
Serial.print(' ');
Serial.println(tavgomb, DEC);
}
irrecv.resume(); // Receive the next value
}
} //Remote end