User`s guide
XBee Digital I/O Adapter
36
Use xbeedin.py functions in Python programs
To use the functions in the module xbeedin.py for programming inputs and
outputs, any Python programs you create must contain this statement:
from xbeedin import *
The functions and arguments in module xbeedin.py are as follows.
############################################################################
# #
# Class XBeeDIN #
# #
############################################################################
# #
# This class derives from the base XBeeDevice class, and implements #
# the Digital IO layer of the Digi XBee Digital IO Adapter. #
# #
############################################################################
# #
# Functions: #
# #
# configure(channel, mode, highlow) - Define channel usage #
# channel - Channel number to be configured. #
# mode - One of (Input, Output) #
# highlow - If in Output mode, this specifies whether the signal #
# should be driven high (1) or low (0). #
# #
# sample(channel) #
# channel - Channel number to be read. #
# Returns digital sample data for specified channel #
# #
# power(onoff) - Toggles Power Output on Terminal 6. #
# onoff - Specifies Power Output either on (1) or off (0). #
# #
############################################################################
Additional programming resources
For further information on writing Python programs and using Python
functions, see:
• Digi Python Programming Guide
http://ftp1.digi.com/support/documentation/90000833_b.pdf
• The Python Support Forum on digi.com
http://www.digi.com/support/forum/forum.jspa?forumID=104
For more information about AT commands, see:
• XBee ZNet 2.5 (Series 2) RF Module data sheet
http://www.digi.com/pdf/ds_xbeemodules.pdf
• XBee ZNet 2.5 (Series 2) RF Module Product Manual
http://ftp1.digi.com/support/documentation/90000866_A.pdf