User`s guide

XBee Wall Router
51
Upload Python modules to gateway
1. Go to www.digi.com/din/docs.
2. In the list of downloadable files, select and download file
XBee Adapter Libraries.
3. Unzip the downloaded file.
4. Read the readme file.
5. Open the web interface for the gateway, go to Applications > Python.
6. In the Upload File edit box, enter the file name for the
XBee Adapter Libraries, DigiXBeeDrivers.zip, using the Browse
button as needed, and click Upload.
Use Python modules in programs
To use the Python modules in the XBee Adapter Libraries in programs that
you develop, append this statement:
sys.path.append("WEB/python/DigiXBeeDrivers.zip")
Use xbeewr.py functions in Python programs
To use the functions in the module xbeewr.py, any Python programs must
contain the next statement:
from xbeewrn import *
The functions and arguments in module xbeeain.py are as follows.
############################################################################
# #
# Class XBeeWRN #
# #
############################################################################
# #
# This class derives from the base XBeeDevice class, and implements #
# the LT (Light/Temperature) layer of the Digi XBee Wall Router Adapter. #
# #
############################################################################
# #
# Functions: #
# #
# raw_sample() #
# #
# Returns a dictionary of raw analog sample data #
# #
# The dictionary will contain the following keys: #
# 1) 'temperature' #
# 2) 'light' #
# #
# #
# sample() #
# #
# Returns a dictionary of data scaled into actual usable values. #
# #
# The dictionary will contain the following keys: #
# 1) 'temperature' - Degrees in Celsius. #
# 2) 'light' - value in lux. #
# #
############################################################################