-
Notifications
You must be signed in to change notification settings - Fork 0
/
dstv_remote_ir.ino
57 lines (45 loc) · 9.26 KB
/
dstv_remote_ir.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// use the include statment below if using an arduino
//#include <IRremote.h> //pio lib install 4 (if using platformio)
//comment this out if you are using an Arduino
#include <IRremoteESP8266.h> //pio lib install 1089 - Wont Compile - download directly from github
//IRsend irsend; //uncomment for arduino - will then use PWM, pin 3, no need to assign pin, pin 3 by default
IRsend irsend(D0); // D0 pin on nodemcuv2, comment this out if using arduino
int khz = 38; // 38kHz carrier frequency for the NEC protocol
// RAW CODES DEFINITION
unsigned int DSTV_A6_MODE1_VOL_PLUS[68] = {7968,3971,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,1499,500,500,500,500,500,500,500,500,500,1499,500,500,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,500,500,1499,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_VOL_MINUS[68] = {7968,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,1499,500,500,500,500,500,500,500,500,500,1499,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_MUTE[68] = {7941,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,1499,500,500,500,1499,500,500,500,500,500,500,500,1499,500,1499,500,500,500,1499,500,500,500,1499,500,1499,500,1499,500,500,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_EXIT[68] = {7968,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,1499,500,1499,500,500,500,1499,500,500,500,500,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,1499,500,1499,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_TV[68] = {7994,3971,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,1499,500,500,500,500,500,500,500,1499,500,1499,500,500,500,1499,500,500,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_UP[68] = {7968,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,1499,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_DOWN[68] = {7968,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,1499,500,500,500,500,500,500,500,500,500,1499,500,1499,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_LEFT[68] = {7988,3981,504,504,504,1486,504,1486,504,504,504,1486,504,1486,504,1486,504,1486,504,1486,504,504,504,504,504,1486,504,504,504,504,504,1486,504,1486,504,1486,504,504,504,504,504,504,504,1486,504,1486,504,504,504,504,504,504,504,1486,504,1486,504,1486,504,504,504,504,504,504,504,504,504};
unsigned int DSTV_A6_MODE1_RIGHT[68] = {7968,3971,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,1499,500,1499,500,1499,500,500,500,1499,500,500,500,1499,500,1499,500,500,500,500,500,500,500,1499,500,500,500,1499,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_OK[68] = {7968,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,1499,500,1499,500,500,500,500,500,500,500,1499,500,1499,500,500,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_NUM_1[68] = {7968,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_NUM_2[68] = {7968,3971,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,500,500,500,500,500,500,500,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,1499,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_NUM_3[68] = {7968,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,500,500,500,500,500,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_NUM_4[68] = {7941,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,500,500,500,500,500,500,1499,500,500,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,1499,500,1499,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_NUM_5[68] = {7941,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,500,500,500,500,500,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,1499,500,500,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_NUM_6[68] = {7941,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,500,500,500,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_NUM_7[68] = {7968,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,500,500,500,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_NUM_8[68] = {7968,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,500,500,500,500,1499,500,500,500,500,500,500,500,1499,500,1499,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_NUM_9[68] = {7968,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,500,500,500,500,1499,500,500,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,1499,500,1499,500,500,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_NUM_0[68] = {7968,3971,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_PLAY_PAUSE[68] = {7968,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,1499,500,500,500,500,500,1499,500,500,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,500,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_REWIND[68] = {7968,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,1499,500,500,500,500,500,1499,500,500,500,500,500,500,500,1499,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_FORWARD[68] = {7941,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,1499,500,500,500,500,500,1499,500,500,500,1499,500,500,500,1499,500,500,500,1499,500,1499,500,500,500,1499,500,500,500,1499,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_CATCH_UP[68] = {7968,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,1499,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,500,500,1499,500,500,500,500,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_PLAYLIST[68] = {7968,3971,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,1499,500,1499,500,500,500,500,500,500,500,500,500,500,500,1499,500,500,500,500,500,500,500,500,500};
unsigned int DSTV_A6_MODE1_INFO[68] = {7968,3997,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,1499,500,1499,500,500,500,1499,500,1499,500,1499,500,1499,500,1499,500,500,500,500,500,1499,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500};
void send_code( unsigned int irSignal[68] ){
irsend.sendRaw(irSignal, 68, khz); //Note the approach used to automatically calculate the size of the array.
}
void setup() {
irsend.begin();
}
void loop() {
send_code(DSTV_A6_MODE1_VOL_PLUS);
Delay(2000);