I was wondering if it possible to toggle a I/O pin from high to low using a serial command.
My setup is:
remote zigbee with a magnetic sensor, when the sensor is tripped the remote zigbee should send a command to the coordinator
then the coordinator should toggle its I/O pin from high to low.
I have been able to send the serial commands with no problems, but I am stuck with the toggling of the I/O.
Is this possible? If so a code example would be greatly appreciated.
The ZB Xbee manual covers the “AT commands” to set I/O serially - or is this a specific ‘programmable xbee’ question?
A specific “programmable xbee” question.
I have a programmable xbee setup for pin sleep. Connected to the pin is the switch. When the switch wakes up the xbee it sends its serial command to the coordinator. The coordinator has a I/O pin set to high. I can’t get the pin to go low once it receives the serial message from the programmable xbee.
I am sure it is something simple, but I can’t seem to figure it out.
Did you have success making sleep the programmable zigbee?
Okay, that helps. Assuming you send one of the Remote AT commands, then you will need to also send the apply change command (so AC) or the coordinator will notice the command but not act upon it. If you use API mode, there is an apply-change bit you can include in the remote-AT command.
You’ll also need some form of pull-up on the corrdinator’s pin as it can only pull low or float, it cannot source current to make itself high. The PR setting can be used.
Do you an example of how this code would look? I am still a little confused.