/
spark-core-ir-remote.ino
388 lines (348 loc) · 21.9 KB
/
spark-core-ir-remote.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
// This #include statement was automatically added by the Particle IDE.
#include "IRemote.h"
// -----------------------------------
// Controlling LEDs over the Internet
// https://github.com/qwertzguy/Spark-Core-IRremote/wiki/Help
// https://github.com/eflynch/sparkcoreiremitter/blob/master/ir_emitter/ir_emitter.ino
// https://github.com/qwertzguy/Spark-Core-IRremote
//https://kalshagar.wikispaces.com/Arduino+and+IR+(infrared)
// -----------------------------------
// name the pins
int IRledPin = 13;
IRsend irsend(D1);
void setup()
{
// We are also going to declare a Spark.function so that we can turn the LED on and off from the cloud.
Spark.function("rotel",rotelFunctions);
Spark.function("atv",atvFunctions);
Spark.function("tv",tvFunctions);
Spark.function("marantz",marantzFunctions);
// This is saying that when we ask the cloud for the function "tvpower", it will employ the function tvpowerToggle() from this app.
}
void loop() {
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ROTEL RECIEVER
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int rotelFunctions(String command) {
if (command=="on") {
for (int i = 0; i < 3; i++)
{
irsend.sendNEC(0xC18819E6, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: power on
delay(40);
}
return 1;
}
else if (command=="off") {
for (int i = 0; i < 3; i++)
{
irsend.sendNEC(0xC18801FE, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: power off
delay(40);
}
return 0;
}
else if (command=="volUp") {
for (int i = 0; i < 3; i++)
{
irsend.sendNEC(0xC1886897, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: vol up
delay(40);
}
return 1;
}
else if (command=="volDown") {
for (int i = 0; i < 3; i++)
{
irsend.sendNEC(0xC188E817, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: VOL+
delay(40);
}
return 1;
}
else if (command=="mute") {
for (int i = 0; i < 3; i++)
{
irsend.sendNEC(0xC18818E7, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: Mute
delay(40);
}
return 1;
}
else if (command=="7ch") {
for (int i = 0; i < 3; i++)
{
irsend.sendNEC(0xC188E11E, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: 7ch in
delay(40);
}
return 1;
}
else if (command=="appletvin") {
for (int i = 0; i < 3; i++)
{
irsend.sendNEC(0xC18820DF, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: appletvin
delay(40);
}
return 1;
}
else if (command=="lpin") {
for (int i = 0; i < 3; i++)
{
irsend.sendNEC(0xC18810EF, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: lp-in
delay(40);
}
return 1;
}
else if (command=="tvin") {
for (int i = 0; i < 3; i++)
{
irsend.sendNEC(0xC188E01F, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: tv-in
delay(40);
}
return 1;
}
else if (command=="zone") {
for (int i = 0; i < 3; i++)
{
irsend.sendNEC(0xC18859A6, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: zone
delay(40);
}
return 1;
}
else if (command=="v3in") {
for (int i = 0; i < 3; i++)
{
irsend.sendNEC(0xC188906F, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: v3 in
delay(40);
}
return 1;
}
else if (command=="v4in") {
for (int i = 0; i < 3; i++)
{
irsend.sendNEC(0xC188C03F, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: v4in
delay(40);
}
return 1;
}
else if (command=="2ch") {
for (int i = 0; i < 3; i++)
{
irsend.sendNEC(0xC188C13E, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: 2ch in 2nd
delay(40);
}
return 1;
}
else {
return -1;
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// SHARP LCD TV - PULLED FROM REMOTE LC-RC1-14
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int tvFunctions(String command) {
int khz=38; //NB Change this default value as neccessary to the correct carrier frequency
if (command=="tv-power") {
unsigned int Signal_tv_power_25[] = {275,1900,275,775,275,775,275,775,275,775,275,775,275,1900,275,1900,275,775,275,1900,275,775,275,775,275,775,275,1900,275,775,275,46244,275,1900,275,775,275,775,275,775,275,775,275,1900,275,775,275,775,275,1900,275,775,275,1900,275,1900,275,1900,275,775,275,1900,275,44148,275,1900,275,775,275,775,275,775,275,775,275,775,275,1900,275,1900,275,775,275,1900,275,775,275,775,275,775,275,1900,275,775,275,54084,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275,1900,275,40996,275,1900,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,1900,275,775,275,49394,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275,1900,275}; //AnalysIR Batch Export (IRremote) - RAW
irsend.sendRaw(Signal_tv_power_25, sizeof(Signal_tv_power_25)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
// AnalysIR IR Protocol: DENON, Key: tv power
return 1;
}
if (command=="tv-ch-down") {
unsigned int Signal_tv_ch__27[] = {275,1900,275,775,275,775,275,775,275,775,275,775,275,1900,275,775,275,775,275,1900,275,775,275,775,275,775,275,1900,275,775,275,47292,275,1900,275,775,275,775,275,775,275,775,275,1900,275,775,275,1900,275,1900,275,775,275,1900,275,1900,275,1900,275,775,275,1900,275,43096,275,1900,275,775,275,775,275,775,275,775,275,775,275,1900,275,775,275,775,275,1900,275,775,275,775,275,775,275,1900,275,775,275,69422,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275,1900,275,40996,275,1900,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,1900,275,775,275,49392,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275,1900,275}; //AnalysIR Batch Export (IRremote) - RAW
irsend.sendRaw(Signal_tv_ch__27, sizeof(Signal_tv_ch__27)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
// AnalysIR IR Protocol: DENON, Key: tv-ch-
return 1;
}
if (command=="tv-ch-up") {
unsigned int Signal_tv_ch__28[] = {275,1900,275,775,275,775,275,775,275,775,275,1900,275,775,275,775,275,775,275,1900,275,775,275,775,275,775,275,1900,275,775,275,47266,275,1900,275,775,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,775,275,1900,275,1900,275,1900,275,775,275,1900,275,43064,275,1900,275,775,275,775,275,775,275,775,275,1900,275,775,275,775,275,775,275,1900,275,775,275,775,275,775,275,1900,275,775,275}; //AnalysIR Batch Export (IRremote) - RAW
irsend.sendRaw(Signal_tv_ch__28, sizeof(Signal_tv_ch__28)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
// AnalysIR IR Protocol: DENON, Key: tv-ch+
return 1;
}
if (command=="tv-mute") {
unsigned int Signal_tv_mute_29[] = {275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,775,275,1900,275,775,275,775,275,775,275,1900,275,775,275,45170,275,1900,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,1900,275,775,275,1900,275,1900,275,1900,275,775,275,1900,275,45176,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,775,275,1900,275,775,275,775,275,775,275,1900,275,775,275,70356,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275,1900,275,41004,275,1900,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,1900,275,775,275,49402,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275,1900,275}; //AnalysIR Batch Export (IRremote) - RAW
irsend.sendRaw(Signal_tv_mute_29, sizeof(Signal_tv_mute_29)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
// AnalysIR IR Protocol: DENON, Key: tv mute
return 1;
}
if (command=="tv-vol-down") {
unsigned int Signal_tv_vol__30[] = {275,1900,275,775,275,775,275,775,275,775,275,1900,275,775,275,1900,275,775,275,1900,275,775,275,775,275,775,275,1900,275,775,275,46220,275,1900,275,775,275,775,275,775,275,775,275,775,275,1900,275,775,275,1900,275,775,275,1900,275,1900,275,1900,275,775,275,1900,275,44118,275,1900,275,775,275,775,275,775,275,775,275,1900,275,775,275,1900,275,775,275,1900,275,775,275,775,275,775,275,1900,275,775,275}; //AnalysIR Batch Export (IRremote) - RAW
irsend.sendRaw(Signal_tv_vol__30, sizeof(Signal_tv_vol__30)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
// AnalysIR IR Protocol: DENON, Key: tv-vol-
return 1;
}
if (command=="tv-vol-up") {
unsigned int Signal_tv_vol__31[] = {275,1900,275,775,275,775,275,775,275,775,275,775,275,775,275,1900,275,775,275,1900,275,775,275,775,275,775,275,1900,275,775,275,47266,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,775,275,1900,275,775,275,1900,275,1900,275,1900,275,775,275,1900,275,43072,275,1900,275,775,275,775,275,775,275,775,275,775,275,775,275,1900,275,775,275,1900,275,775,275,775,275,775,275,1900,275,775,275,62280,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275,1900,275,40972,275,1900,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,1900,275,775,275,49376,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275,1900,275}; //AnalysIR Batch Export (IRremote) - RAW
irsend.sendRaw(Signal_tv_vol__31, sizeof(Signal_tv_vol__31)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
// AnalysIR IR Protocol: DENON, Key: tv-vol+
return 1;
}
if (command=="tv-enter") {
unsigned int Signal_tv_enter_32[] = {275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275,42028,275,1900,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,1900,275,775,275,775,275,775,275,775,275,775,275,1900,275,48318,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275,41890,275,1900,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,1900,275,775,275,775,275,775,275,775,275,775,275,1900,275}; //AnalysIR Batch Export (IRremote) - RAW
irsend.sendRaw(Signal_tv_enter_32, sizeof(Signal_tv_enter_32)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
// AnalysIR IR Protocol: DENON, Key: tv-enter
return 1;
}
if (command=="tv-left") {
unsigned int Signal_tv_left_33[] = {275,1900,275,775,275,775,275,775,275,775,275,1900,275,775,275,1900,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275,43104,275,1900,275,775,275,775,275,775,275,775,275,775,275,1900,275,775,275,1900,275,775,275,775,275,775,275,775,275,775,275,1900,275,47302,275,1900,275,775,275,775,275,775,275,775,275,1900,275,775,275,1900,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275}; //AnalysIR Batch Export (IRremote) - RAW
irsend.sendRaw(Signal_tv_left_33, sizeof(Signal_tv_left_33)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
// AnalysIR IR Protocol: DENON, Key: tv-left
return 1;
}
if (command=="tv-down") {
unsigned int Signal_tv_down_34[] = {275,1900,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,1900,275,1900,275,775,275,1900,275,775,275,1900,275,775,275,46248,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,775,275,775,275,1900,275,775,275,1900,275,775,275,1900,275,44112,275,1900,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,1900,275,1900,275,775,275,1900,275,775,275,1900,275,775,275}; //AnalysIR Batch Export (IRremote) - RAW
irsend.sendRaw(Signal_tv_down_34, sizeof(Signal_tv_down_34)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
// AnalysIR IR Protocol: DENON, Key: tv-down
return 1;
}
if (command=="tv-right") {
unsigned int Signal_tv_right_35[] = {275,1900,275,775,275,775,275,775,275,775,275,775,275,1900,275,1900,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275,43090,275,1900,275,775,275,775,275,775,275,775,275,1900,275,775,275,775,275,1900,275,775,275,775,275,775,275,775,275,775,275,1900,275,47302,275,1900,275,775,275,775,275,775,275,775,275,775,275,1900,275,1900,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275,61142,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275,1900,275,41002,275,1900,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,1900,275,775,275,49396,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275,1900,275}; //AnalysIR Batch Export (IRremote) - RAW
irsend.sendRaw(Signal_tv_right_35, sizeof(Signal_tv_right_35)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
// AnalysIR IR Protocol: DENON, Key: tv-right
return 1;
}
if (command=="tv-up") {
unsigned int Signal_tv_up_36[] = {275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,775,275,1900,275,775,275,1900,275,775,275,1900,275,775,275,44122,275,1900,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,1900,275,775,275,1900,275,775,275,1900,275,775,275,1900,275,46224,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,775,275,1900,275,775,275,1900,275,775,275,1900,275,775,275,70324,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275,1900,275,40974,275,1900,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,775,275,1900,275,775,275,49368,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,1900,275,775,275,1900,275}; //AnalysIR Batch Export (IRremote) - RAW
irsend.sendRaw(Signal_tv_up_36, sizeof(Signal_tv_up_36)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
// AnalysIR IR Protocol: DENON, Key: tv-up
return 1;
}
if (command=="tv-input") {
unsigned int Signal_tv_input_37[] = {275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,775,275,775,275,1900,275,775,275,775,275,775,275,1900,275,775,275,46246,275,1900,275,775,275,775,275,775,275,775,275,775,275,775,275,1900,275,1900,275,775,275,1900,275,1900,275,1900,275,775,275,1900,275,44150,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,775,275,775,275,1900,275,775,275,775,275,775,275,1900,275,775,275,46106,275,1900,275,775,275,775,275,775,275,775,275,775,275,775,275,1900,275,1900,275,775,275,1900,275,1900,275,1900,275,775,275,1900,275,44008,275,1900,275,775,275,775,275,775,275,775,275,1900,275,1900,275,775,275,775,275,1900,275,775,275,775,275,775,275,1900,275,775,275}; //AnalysIR Batch Export (IRremote) - RAW
irsend.sendRaw(Signal_tv_input_37, sizeof(Signal_tv_input_37)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
// AnalysIR IR Protocol: DENON, Key: tv-input
return 1;
}
else {
return -1;
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// APPLE TV
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int atvFunctions(String command) {
if (command=="atv-menu") {
irsend.sendNEC(0x77E1C09E, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: atv-menu
return 1;
}
else if (command=="atv-enter") {
irsend.sendNEC(0x77E13A9E, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: atv-enter
return 0;
}
else if (command=="atv-left") {
irsend.sendNEC(0x77E1909E, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: atv-left
return 0;
}
else if (command=="atv-right") {
irsend.sendNEC(0x77E1609E, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: atv-right
return 0;
}
else if (command=="atv-up") {
irsend.sendNEC(0x77E1509E, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: atv-up
return 0;
}
else if (command=="atv-down") {
irsend.sendNEC(0x77E1309E, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: atv-down
return 0;
}
else if (command=="atv-playpause") {
irsend.sendNEC(0x77E1FA9E, 32); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: NEC, Key: atv-playpause
return 0;
}
else {
return -1;
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// MARANTZ
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int marantzFunctions(String command) {
if (command=="m-power") {
for (int i = 0; i < 3; i++)
{
irsend.sendRC5(0x140C, 14); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: RC5, Key: marantzpower
delay(40);
}
return 1;
}
else if (command=="m-mute") {
for (int i = 0; i < 3; i++)
{
irsend.sendRC5(0x140D, 14); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: RC5, Key: marantz mute
delay(40);
}
return 0;
}
else if (command=="m-vol-up") {
for (int i = 0; i < 3; i++)
{
irsend.sendRC5(0x1410, 14); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: RC5, Key: marantz vol +
delay(40);
}
return 0;
}
else if (command=="m-vol-down") {
for (int i = 0; i < 3; i++)
{
irsend.sendRC5(0x1411, 14); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: RC5, Key: marantz vol -
delay(40);
}
return 0;
}
else if (command=="m-sleep") {
for (int i = 0; i < 3; i++)
{
irsend.sendRC5(0x1426, 14); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: RC5, Key: marantz sleep
delay(40);
}
return 0;
}
else if (command=="m-tuner") {
for (int i = 0; i < 3; i++)
{
irsend.sendRC5(0x147F, 14); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: RC5, Key: marantz tuner
delay(40);
}
return 0;
}
else if (command=="m-dvd") {
for (int i = 0; i < 3; i++)
{
irsend.sendRC5(0x050, 9); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: RC5, Key: marantz dvd
delay(40);
}
return 0;
}
else if (command=="m-phono") {
for (int i = 0; i < 3; i++)
{
irsend.sendRC5(0x157F, 14); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: RC5, Key: marantz phono
delay(40);
}
return 0;
}
else if (command=="m-cd") {
for (int i = 0; i < 3; i++)
{
irsend.sendRC5(0x153F, 14); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: RC5, Key: marantz cd
delay(40);
}
return 0;
}
else if (command=="m-dss") {
for (int i = 0; i < 3; i++)
{
irsend.sendRC5(0x11BF, 14); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: RC5, Key: marantz dss
delay(40);
}
return 0;
}
else if (command=="m-vcr") {
for (int i = 0; i < 3; i++)
{
irsend.sendRC5(0x117F, 14); //AnalysIR Batch Export (IRremote) // AnalysIR IR Protocol: RC5, Key: marantz vcr
delay(40);
}
return 0;
}
else {
return -1;
}
}