I am working on a project similar to the Joystick tutorial, but I need 8 buttons instead of 4.
I modified the simple AT commands for the transmitter:
-I added Pins 4-7 for Digital Input
-I changed detection to FF (to detect all 8 inputs)
And for the receiver:
-I added pins 1-7 for Digital Output, high on startup
I hooked 8 leds up to the receiver xbee and it all actually works very well!
Two questions:
-The inputs I am feeding the transmitter are active LOW (a CAP1188 board). Is there a way to invert that in either the transmitter or receiver xbee? Right now the receiver LEDs are on until I touch the sensors, I would like the opposite.
-I notice every 5 seconds one of the xbees resets or polls the other, so the signal is reset. So if I continue to touch the sensors for longer than 5 seconds (which turns the LEDs off), the LEDs all turn on even though I am still sending the transmitter xbee the same inputs. I need to have it so as long as I am touching a sensor, that signal is repeated on the receiving xbee radio. It really is for a wireless 8 button game controller, so I need very exact precision.
I am not seeing anything jumping out at me. Are you getting anything on the UART of the DO module (You have it saved as Transmitter when it is actually the receiver)? If the other module is sending data, that data would be sent out the UART as you have the IU enabled.
I reprogrammed both radios, updated the firmware, etc, and made sure the Transmitter is the E and the Receiver is the C. I also turned off IU. The signal still reset after 6 seconds. Even if I only have the receiver board active, I can see the LEDs blinking every 6 seconds.
On a whim, I changed the pull-up resistor back to FF (the default, I had changed it to 1) and now everything appears to work! Why would that change fix it?
You probably were seeing the module do a watch dog reset within the code. Turning off the internal pull-ups can cause you to see things you generally would not see.