As you can see the protocol is unknown and I cannot find a way to include the extended data byte for RC5x in IRSender; any additional data is just ignored and I get RC5 code. I have tried IRSender.sendRC5x and IRsender.sendRC5Ex, but that was in past versions of IRremote, not V3.9.0. I also have a XLS file I downloaded from Marantz that shows the IR codes for the NR1509 receiver that calls the code RC5x so I'm confident it is nothing else. See the screenshot below.
I have gathered bits and pieces of information about this protocol form the Internet and it is sometimes referred to as Marantz Extended maybe because Marantz is the only one using it?? My code is posted below as well and everything, but the RC5x does work. Some of the comments may not be correct any longer since I have been tweaking the RC5x code, but the line that sends RC5x begins with:
else if (digitalRead(btn5Ch))
I want to thank everyone for the help. The command I want to send is not on the remote, but shows up in the XLS and does work on my receiver. Using Docdoc's code I could very likely make the raw send work with some trial and error. Thank you Docdoc!
Here is the ReceiveDump for the 'Option' button:
Protocol=UNKNOWN Hash=0x10B1B5AF 15 bits (incl. gap and start) received
Raw result in internal ticks (50 us) - with leading gap
rawData[30]:
-65535
+36,-33
+19,-16 +36,-16 +19,-16 +18,-17
+18,-89 +19,-33 +36,-16 +19,-33
+36,-16 +19,-16 +18,-34 +36,-33
+18,-17 +18
Sum: 750
Raw result in microseconds - with leading gap
rawData[30]:
-3276750
+1800,-1650
+950,- 800 +1800,- 800 + 950,- 800 + 900,- 850
+900,-4450 + 950,-1650 +1800,- 800 + 950,-1650
+800,- 800 + 950,- 800 + 900,-1700 +1800,-1650
+900,- 850 + 900
Sum: 37500
Result as internal ticks (50 us) array - compensated with MARK_EXCESS_MICROS=20
uint8_t rawTicks[29] = {36,33, 19,16, 36,16, 19,16, 18,17, 18,89, 19,33, 36,16, 19,33, 36,16, 19,16, 18,34, 36,33, 18,17, 18}; // Protocol=UNKNOWN Hash=0x10B1B5AF 15 bits (incl. gap and start) received
Result as microseconds array - compensated with MARK_EXCESS_MICROS=20
uint16_t rawData[29] = {1780,1670, 930,820, 1780,820, 930,820, 880,870, 880,4470, 930,1670, 1780,820, 930,1670, 1780,820, 930,820, 880,1720, 1780,1670, 880,870, 880}; // Protocol=UNKNOWN Hash=0x10B1B5AF 15 bits (incl. gap and start) received
Pronto Hex as string
char prontoData[] = "0000 006D 000F 0000 0046 003F 0025 001E 0046 001E 0025 001E 0023 0020 0023 00AA 0025 003F 0046 001E 0025 003F 0046 001E 0025 001E 0023 0041 0046 003F 0023 0020 0023 06C3 ";
Code is below:
#include <Arduino.h>
/*
Define macros for input and output pin etc.
*/
#include "PinDefinitionsAndMore.h"
#include "IRremote.hpp"
#include "IRFeedbackLED.hpp"
#define DELAY_AFTER_SEND 100
#define DELAY_BETWEEN_PRESS 750
int btnChUp = 10;
int btnChDn = 9;
int btnPwr = 8;
int btnMute = 7;
int btnVUp = 6;
int btnVDn = 5;
int btn5Ch = 4;
void setup() {
pinMode(4, INPUT);
pinMode(5, INPUT);
pinMode(6, INPUT);
pinMode(7, INPUT);
pinMode(8, INPUT);
pinMode(9, INPUT);
pinMode(10, INPUT);
enableLEDFeedback();
Serial.begin(115200);
// Just to know which program is running on my Arduino
IrSender.begin(IR_SEND_PIN, ENABLE_LED_FEEDBACK); // Specify send pin and enable feedback LED at default feedback LED pin
}
/*
Set up the data to be sent.
For most protocols, the data is build up with a constant 8 (or 16 byte) address
and a variable 8 bit command.
*/
uint16_t sAddress = 0x0010; // 16 base 10, 1 0000
uint16_t nAddress = 0xFB04; //
uint8_t sCommandM = 0x0D; // 13 base 10, Mute Toggle 00 1101
uint8_t sCommandVUp = 0x10; // 16 base 10, Volume Up
uint8_t sCommandVDn = 0x11; // 17 base 10, Volume Down
uint8_t sCommand5Ch = 0x25; //Need to work on this
uint8_t sRepeats = 0x00; //
uint8_t nCommandPwr = 0x08;
uint8_t nCommandChD = 0x01;
uint8_t nCommandChU = 0x00;
bool bToggle = false;
void loop() {
if (digitalRead(btnMute)) {
do {
IrSender.sendRC5(sAddress & 0x1F, sCommandM & 0x3F, sRepeats, bToggle); // 5 address, 6 command bits. MUTE
delay(DELAY_AFTER_SEND);
bToggle = false;
} while (digitalRead(btnMute));
bToggle = true;
delay(DELAY_BETWEEN_PRESS);
} else if (digitalRead(btnVUp)) {
do {
IrSender.sendRC5(sAddress & 0x1F, sCommandVUp & 0x3F, sRepeats, bToggle); // 5 address, 6 command bits. Vol Up
delay(DELAY_AFTER_SEND);
bToggle = false;
} while (digitalRead(btnVUp));
bToggle = true;
delay(DELAY_BETWEEN_PRESS);
} else if (digitalRead(btnVDn)) {
do {
IrSender.sendRC5(sAddress & 0x1F, sCommandVDn & 0x3F, sRepeats, bToggle); // 5 address, 6 command bits. Vol Down
bToggle = false;
delay(DELAY_AFTER_SEND);
} while (digitalRead(btnVDn));
bToggle = true;
delay(DELAY_BETWEEN_PRESS);
} else if (digitalRead(btn5Ch)) {
IrSender.sendRC5(sAddress & 0x1F, (sCommand5Ch & 0x3F) + 0x40, sRepeats, false); // 5 address, 7 command bits. Set Multichannel Stereo
delay(DELAY_AFTER_SEND);
}
else if (digitalRead(btnPwr)) {
do {
IrSender.sendNEC(nAddress & 0xFF, nCommandPwr, sRepeats); // 16 address, 8command bits. Power toggle
delay(DELAY_AFTER_SEND);
} while (digitalRead(btnVDn));
delay(DELAY_BETWEEN_PRESS);
}
else if (digitalRead(btnChDn)) {
do {
IrSender.sendNEC(nAddress & 0xFF, nCommandChD, sRepeats); // 16 address, 8command bits. Power toggle
delay(DELAY_AFTER_SEND);
} while (digitalRead(btnChDn));
delay(DELAY_BETWEEN_PRESS);
}
else if (digitalRead(btnChUp)) {
do {
IrSender.sendNEC(nAddress & 0xFF, nCommandChU, sRepeats); // 16 address, 8command bits. Power toggle
delay(DELAY_AFTER_SEND);
} while (digitalRead(btnChUp));
delay(DELAY_BETWEEN_PRESS);
}
}