Hi all, I am working on a project with two parts, both of which have an MCU. One end sends IR signals and the other end receives them. I don't need the IR transmitter to control anything else. In other words, I just need a dedicated channel between these two specific devices. The data I'm sending contains the x and y coordinates of a joystick.
I am aware of IRRemote library and I have tried to utilize it. I'm packing the coordinates into 16 bits and sending it as the command. It works fine for the most part but there's some finickiness. E.g. when I tried to send a 16 bit command 0x007F, the receiving end gets 0x7F7F. My guess is that when the highest 8 bits are all 0s, it has some special meaning.
Anyhow, since I have full control of both ends, I don't really need any complicated encoding and decoding logic. I just need to be able to encode and decode raw data of fixed length, say 32 bits at a time. Other than going through IRRemote and stripping it down, is there a simple library that serves this purpose? Thanks.
Problem is, the hardware does need it to some extent. You have to at least send a preamble to settle the receiver AGC, and you have to obey the minimum/maximum pulse width timing, in order not to exceed the channel bandwidth. Then, it is also your responsibility to provide encoding, and error detection and/or correction.
I've guessed wrong before, but I very much doubt that there is any dedicated library for this application...
My guess, you gave up on IRRemote too soon. You should research the different proprietary protocols that it supports, looking for one that meets your needs. It's possible you just picked a difficult one.
Also, your post is very general, you're not helping us out with information about your MCU's and other devices. I know that you were just hoping for a link to something like that, but I think you would have better luck asking for help doing it yourself, because of the unlikelihood of the existence of that kind of library...