XBee v1 w/XB24-DM firmware

Hello,

I have 2 XBees. 1(#2) is connected rx/tx to my Mega1280 which is programmed to run a stepper motor cw and ccw. It also will run via cw pushbutton switch and ccw pushbutton switch. The program works very good.

I now hook up my other radio (#1) to 2 pushbutton switches and an FTDI USB for laptop control via serial.

Serial commands work correctly. Pushbuttons do not.

If this is unclear, please, let me know.

Does anyone know how to use switch inputs from #1 XBee to act as switch inputs actually attached to Mega? Or, perhaps, to send the same serial characters that Mega already responds to?

Thanks.

How have you configured the XBees?

I do believe so Paul.

I am using the #1 via XCTU to send serial commands through XBees to Mega and it works.

I have configured #1 XBee with D1 and D2 as digital inputs. which the 2 switches are hooked to. the other side is hooked to GND.

I think what is missing here is XBee #1 is saying:

“OK. Great. D1 and D2 are D inputs. So what? What am I suppose to do when I receive an input from either of them?”

I guess I need some way of configuring the XBee to save a serial command for each a button press. To be sent upon buttonpress. Almost like hitting . No?

I wondered if setting D1 and D2 as outputs on #2 XBee would work. So, I checked on Digi's site and they say yes. They correspond pin for pin on mated radios. OK. Cool. So then, I can set #1 as inputs, then set #2 as the outputs.

So, I now have #2 D1/D2 hooked up to Megas cw/ccw switches. So, the Mega should work when it gets either a HIGH from the 5v on the breadboard, or a HIGH from the D-outputs from #2. But, when I try it, I get nothing.

Please, does anybody know how to configure these XBee's?