This must be a really obvious question, because I can’t find the answer anywhere.
I have a series 1 (802.15.4) Xbee. I want to hook up a button switch such that when the button is pressed, it sends a message to another Xbee.
I have all of the xbee programming, pin setup, API frame, etc figured out.
My question: Do I connect the switch between the DIO pin and VCC? Or between the DIO pin and GND? In other words, is it looking for a press low or a press high?
According to the document it can be done either way. Look up “DIO Pin Change Detect” and command IC.
This means that a packet with the pin data will be sent whenever the pin logic level changes from low to high or high to low. So a switch press and release sends two packets, one for each Pin Change.
The way I set up for this is to enable the internal pull-ups, PR command, and have the switch go to ground. The software receiving the packet must then deceiver a high to low data as a switch press and the low to high data as a switch release.