I went to the hacker dojo last night and met some guys that gave me some good debugging tips that I am putting to good use in my project. I had an insanely ghetto way of debugging the soldered atmega. I was using 2 LED debug lights to signify when certain things happened in my light. It turns out (thanks random hacker dojo guy) that you can actually hook up any pin of the soldered atmega to an arduino running a serial debugger program like SerialSoftwareExample from the arduino example library. You just set the RX and TX pins depending on who you want to read, and who you want to transmit.
One interesting thing in doing this is you have to connect the ground of the arduino to the ground of the rest of the circuit, which makes a lot of sense that they all need a common ground. It’s only when I did this that I noticed the radio seemed to be less noisy, but was still receiving invalid messages.
In fact, the radio would receive button presses even though the remote was incorrect. I need to do a couple things:
1) Solder a debug pin to the remote atmega to attach to a second Arduino.
2) Remove the second, now unnecessary debug out solder from the led atmega.
3) Change the button press values to something that doesn’t start at 0 to avoid getting a noisy message that happens to be 0. It seems to be receiving NULL messages in some conditions where there is some noise on the antenna, so this is a bad value for a potential message.
4) Print the initialization data of each radio to make sure it is initing properly, and then determine if the transmitter radio is actually finding the receiving one.
Also, I have a new couple items to progress my little Arduino Hobby to the next level…
Saleae Logic USB Logic Analyzer
This little guy will help me track what pins are doing what, while printing the serial out all in one nice setup…I here the software for it is beautiful as well.
Secondly, this would have saved me so much trouble:
http://www.taydaelectronics.com/hardware/prototyping-boards/small-stripboard-94x53mm-copper.html
Just use a drill bit to scrape away the copper plating that you don’t need. I am gonna buy 20 of these bad boys!!! Taydaelectronics has great deals by the way.