Hi All;
Sorry, this is probably a total noob question. I’m reading the building sensor networks book and I can see how to setup polling intervals, and sleep intervals, but not how the two are combined.
I am looking to take readings off Analog pins 2&3, one reading per minute, with the Xbee sleeping between readings. Ideally I’d also like some idea of how the battery life is looking so I can send alerts to change the batteries.
If the XBee is set to be an ‘Router’ or ‘Coordinator’ it does not sleep naturally. If it is set to be an ‘Endpoint’ then it automatically sleeps between cycles. Endpoints can’t route other participants packages only talk directly to them.
Set your polling interval to 60 seconds. ( 0xEA60 )
For the battery life you can either use a third channel ADC to measure a ( scaled ) sense of the battery or you can use the main supply sense function. If you use the built in function and a voltage regulator instead of straight off a battery pack to drive the XBEE you may get caught out as the regulator may drop out before you detect a battery drop off.
To sense power supply level simply set the V+value in the XCTU config to the value at which you wish to trigger voltage alerts to the network.
1 Like
update -
Appear that the S2 modules don’t do an analog sample on IC triggered reads. You will have to query the endpoint or trigger a transmission with an IS frame.