Hello,
I'm trying to figure out a good and simple way to store IR codes to the EEPROM of the Arduino Uno. I am building a DAC and want to create some sort of IR learn function that allows me to teach my DAC the IR codes for certain functions.
I'm using Ken Shirriff his IR library to get the codes, but the codes consist out of two sets of 32 bits for nearly all my remotes. If I get it right I can only store 8 bit values to the EEPROM at the time, so I need to split the received value. Now this is where I'm beginning to struggle. I must warn you that I'm really not into bits and byte but I'm eager to learn.
I used this to split the 32 bits binary value into four pieces (probably not the best way)
a = lowByte(results.value);
b = (results.value >> 8);
c = (results.value >> 16);
d = (results.value >> 24);
this is done twice for most IR codes
Now I have this four/eight pieces and want to store these to a certain location in the EEPROM, so when a remote is used the code can compare its code to the stored code and should therefore be able to determine which function it should call. I know how to store and read the values in the EEPROM by using a small loop to shift position at the EEPROM, but how to handle remote codes that switch bits between each key press?
I can't see the forest for the trees anymore ![]()
It is probably done before....