Blogger

Delete comment from: Ken Shirriff's blog

Scott said...

Hey guys.
I have added a Samsung protocol to the library and everything is working great. I am now trying to control my ac unit but I am having some trouble. I got all the timings of the remote from the dump and I have doubled checked them with an oscilloscope.
The dump is:
A4B2955B
Unknown encoding: A4B2955B (32 bits)
Raw (44): 15050 4450 -4350 650 -1600 550 -500 650 -500 600 -500 600 -500 600 -500 600 -500 650 -500 550 -550 600 -1600 600 -500 600 -500 600 -1650 600 -1600 600 -1600 600 -1600 650 -1600 600 -1600 600 -500 650 -500 550

Which means it is sending: 1000 0000 0100 1111 1100(804FC) and is only 20 bits. Which is all well and good but the problem I am having it that it repeats x3 with a 18420us pause between each. So I have added the following parameters to the IRremoteint file:
AC_HDR_MARK 4450
AC_HDR_SPACE 4350
AC_BIT_MARK 600
AC_ONE_SPACE 1600
AC_ZERO_SPACE 500
AC_RPT_SPACE 18420

I have been able to turn on and off the AC unit by sending raw codes in triplicate but I don't have a lot of memory available and cant afford to define 9 rawcodes in my program.
I know that the Sony protocol sends in triplicate so I tried to modify the the irsend::sendSony function but it did not work. I am new to C/C++ and I don't really understand how/why the bits are being shifted around.(i.e. data = data << (32 - nbits);) So a sony code is 12 bits. 32-12=20. So the data is being shifted to the left 20bits?? Something to do with MSB, and LSB?

I am at a loss of how to write a function to send 20 bits, 3 times, with an exact spacing? Any help would be greatly appreciated!

Sep 11, 2012, 7:27:39 PM


Posted to A Multi-Protocol Infrared Remote Library for the Arduino

Google apps
Main menu