cyborg5 / IRLib2

Library for receiving, decoding, and sending infrared signals using Arduino
GNU General Public License v3.0
384 stars 138 forks source link

RCMM protocol - how to do it #119

Open WhatDoYouKnow opened 1 year ago

WhatDoYouKnow commented 1 year ago

Hi I am trying to implement a remote control based on the RCMM protocol. Unfortunately, there's no information on the web on this. I have found a resource on the web about what the protocol sends and the detection program agrees with it. All successful so far.

The problem comes with the send instruction. I'm not sure how to implement a send command and everything I've tried so far has resulted in no success with the target to be controlled or another Arduino set up as a receiver. The Arduino receiver calls it "unknown" so something is not right.

The original remote sends 32 characters (256 bits) where the first 232 bits are identical. How do I tell the program to send the code I'm interested in? Just supply the last 12 bits (the only ones which change) and the library does the rest? Is it that simple? I ask because the receiver Arduino still says "unknown" and I'm unsure how to proceed? It's not obvious to me from the documentation what should be done. I'd appreciate any help. Thanks in advance.

WhatDoYouKnow commented 1 year ago

Sorry - forgot to say what Arduino I'm using - Adafruit M4 Express (SAMD51) with an Adafruit LED and sensor.

WhatDoYouKnow commented 1 year ago

Now worked out how to drive the protocol: There are lots of 00 bytes in the RCMM code. These are ignored when creating the payload so it's a 32-bit code consisting of the last 4 non-zero bytes. The code is being sent and being read correctly about 30% of the time - however, this is a constant send separated by 100ms. It appears that the sending is a bit off or my circuit is not very good. Using a very old NPN (ZTX108) but should be OK. 470R between the pin and transistor base. Diode linked to 3V3 and the collector of the transistor as per the diagram. Is there anything more I can do to improve the performance? Any help appreciated. Thanks. Max