The system needs a bit of code to do a 'one off' exercise first. This code listens to the radio receiver and when a button on a HE remote control is pressed, the software reads the incoming transmission and decodes the following key items of information:-
- the address code for the remote control unit (this is needed since all devices need to be paired with a one or more remotes, and won't activate otherwise)
- the address code for the target HE devices - if you don't know the code for the device, how can you switch it on?
The receiver software collects other stuff in the incoming package as well, but these are the only bits I am interested in.
The whole process fell in a heap at this point. Some of the Arduino software that I downloaded threw up loads of compile errors, possibly because not all of the required libraries are available. Other software uploaded to the Arduino OK, but then just sits there blank with no indication of what (if anything) its doing. Out with the breadknife and hacked the code around a bit to discover that -
- the radio module receives a fair amount of random noise traffic, to be expected I guess
- I get no change to the random noise when the button on the HE remote is pressed.
Tried a second receiver module in case the first was duff, but no change. Switched to several different input pins on the Arduino, no change. I have two different HE remotes, a HE200 and a HE300, no difference regardless of which one I used. Hmmm.
The HE remote is supposed to send a preamble sequence of high and low pulses to alert the target device that a live transmission is coming, and then sends a data package. The software that I have downloaded is supposed to look for the preamble and then capture the data. So, I have the following possible causes for my non-capturing:-
- the remote is sending a completely different bundle of preamble and data to that which the software is looking for
- the radio module is faulty
- I've connected the module wrong (unlikely, there's only three wires plus an antenna)
- the Arduino is reading the wrong pin
- the software is not reading the pulses on the input pin properly (I really hope its not the software as a) cleverer people than me have written the code, and b) although I can code simple stuff, this is a lot more complex and its going to take me ages to learn to write my own.)
I need to rule out the radio module first, so the first task is to hook it up to 5v power from a separate power supply (in case the Arduino output is too low - its already running a bunch of LEDs around the house - and look at the data output with an oscilloscope. If I get output from it, the next stage is to see how it changes when the HE remote is pressed next to its ear. A positive result from this means the radio is OK, so I then need to look further.
I'll hook up the 'scope over the next few days and see where we are then.