How to add new protocol. #1184
-
Hi, I used IRremote to decode the remote signal of a MaxxFan ceilling ventillation for VR. I successfully decoded it. Pulse lenght is 800 microseconds. 1 bit per pulse lenght. High pulse mean 0, Low pulse mean 1. So to get 01100111111 you will send the following pulses: +800, -1600, +1600, -4800. Each frame are composed of a start bit (0), then 8 data bits, and closed with 2 ends bits (11). A total of 16 frames are used per key press on the remote. There is a header (10 frames), data section (3 frames), a footer (2 frames) and a check bits (1 frame). A key on the remote can send different signal according to the current state. The data section can vary for multiple key press of the same key on the remote. There is not signal repetition if a key is hold. Signal is only sent when the key is released. My question, is there a tutorial to create/add a new protocal in IRremote library. Also, the signal doesn't only map to a key code. It contains different information, like fan state (off, on, auto), fan speed, fan direction, fan beep, lid state (Close/Open), temperature. So I need a way to send/received these information. I don't know if the library will support that. I was thinking of writing a module to generate the raw pulse array and send it with IrSender.sendRaw() and do something simillar to receive it but I was looking for something more integrated or lightweight. Should I use a more basic IR library to implement this protocol? Suggestion are welcome. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Best would be to have a routine which sends a byte, another which sends a byte array (of fixed length?) and something to compose the byte array like https://github.com/Arduino-IRremote/Arduino-IRremote/blob/master/src/ac_LG.h and https://github.com/Arduino-IRremote/Arduino-IRremote/blob/master/src/ac_LG.hpp. |
Beta Was this translation helpful? Give feedback.
Thank you for the information. I'm pretty sure ac_LG code will guide me in the right direction.