Home/Support/Support Forum/What command do I use to request a measurement every X minutes?

What command do I use to request a measurement every X minutes?

0 votes
I apologize, this is very basic, but I can't seem to find a tutorial on the web.

If I want a Digi XBee3 to report the temperature of the chip every x seconds/minutes/hours, what command would I use for the timing? If I put it to sleep on a cycle, will it know to run the code when it wakes up? I'm starting with the basic AT command example:

import xbee

print(" +
print(" | XBee MicroPython AT Commands Sample |")
print(" +

# Read the module's temperature.
temperature = xbee.atcmd("TP")
# convert unsigned 16-bit value to signed temperature
if temperature > 0x7FFF:
temperature = temperature - 0x10000
print("The XBee is %.1F C (%.1F F)" % (temperature, temperature * 9.0 / 5.0 + 32.0))

Thank you for your help!
asked Nov 30, 2020 in RF Solutions and XBee by elizabeth.farrell New to the Community (3 points)

Please log in or register to answer this question.

1 Answer

+1 vote
you would use the XBee sleep function

answered Nov 30, 2020 by mvut Veteran of the Digi Community (14,299 points)
That is exactly what I needed, thank you!