-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,54 @@ | ||
========= | ||
XBee | ||
========= | ||
==== | ||
|
||
XBee provides an implementation of the XBee serial communication API. It | ||
allows one to easily access advanced features of one or more XBee | ||
devices from an application written in Python. An example use case might | ||
look like this:: | ||
|
||
#! /usr/bin/python | ||
|
||
# Import and init an XBee device | ||
from xbee import XBee,ZigBee | ||
import serial | ||
```python | ||
#! /usr/bin/python | ||
|
||
ser = serial.Serial('/dev/ttyUSB0', 9600) | ||
# Import and init an XBee device | ||
from xbee import XBee,ZigBee | ||
import serial | ||
|
||
ser = serial.Serial('/dev/ttyUSB0', 9600) | ||
|
||
# Use an XBee 802.15.4 device | ||
# To use with an XBee ZigBee device, replace with: | ||
#xbee = ZigBee(ser) | ||
xbee = XBee(ser) | ||
|
||
# Set remote DIO pin 2 to low (mode 4) | ||
xbee.remote_at( | ||
dest_addr='\x56\x78', | ||
command='D2', | ||
parameter='\x04') | ||
|
||
xbee.remote_at( | ||
dest_addr='\x56\x78', | ||
command='WR') | ||
``` | ||
|
||
# Use an XBee 802.15.4 device | ||
# To use with an XBee ZigBee device, replace with: | ||
#xbee = ZigBee(ser) | ||
xbee = XBee(ser) | ||
|
||
# Set remote DIO pin 2 to low (mode 4) | ||
xbee.remote_at( | ||
dest_addr='\x56\x78', | ||
command='D2', | ||
parameter='\x04') | ||
|
||
xbee.remote_at( | ||
dest_addr='\x56\x78', | ||
command='WR') | ||
|
||
|
||
Installation | ||
============ | ||
|
||
Extract the source code to your computer, then run the following command | ||
in the root of the source tree:: | ||
|
||
python setup.py install | ||
``` | ||
python setup.py install | ||
``` | ||
|
||
This will automatically test and install the package for you. | ||
|
||
Additionally, one may run this package's automated tests at any time | ||
by executing:: | ||
|
||
python setup.py test | ||
``` | ||
python setup.py test | ||
``` | ||
|
||
If a Test Fails | ||
--------------- | ||
|
@@ -60,7 +64,7 @@ Documentation | |
|
||
See the python-xbee project on Google Code (https://code.google.com/p/python-xbee/downloads/list) | ||
for the latest documentation. | ||
|
||
To build the documentation yourself, ensure that Sphynx (http://sphinx.pocoo.org/) | ||
is installed. Then cd into the docs folder, and run 'make html'. The documentation can then be opened in | ||
any modern web browser at docs/build/html/index.html. | ||
|
@@ -74,7 +78,7 @@ Dependencies | |
PySerial | ||
|
||
Additional Dependencies | ||
-------------------------------------------- | ||
----------------------- | ||
|
||
To run automated tests: Nose (https://code.google.com/p/python-nose/) | ||
To build the documentation: Sphinx (http://sphinx.pocoo.org/) | ||
|
@@ -87,14 +91,15 @@ provided by Digi. Using an old firmware revision is not supported and | |
may result in unspecified behavior. | ||
|
||
Contributors | ||
================== | ||
============ | ||
|
||
Paul Malmsten <[email protected]> | ||
Greg Rapp <[email protected]> | ||
Brian <[email protected]> | ||
Chris Brackert <[email protected]> | ||
|
||
Special Thanks | ||
================== | ||
============== | ||
|
||
Amit Synderman, | ||
Marco Sangalli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
from distutils.core import setup | ||
|
||
packages=[ | ||
'xbee', | ||
'xbee.tests', | ||
'xbee.helpers', | ||
'xbee', | ||
'xbee.tests', | ||
'xbee.helpers', | ||
'xbee.helpers.dispatch', | ||
'xbee.helpers.dispatch.tests', | ||
] | ||
|
||
setup( | ||
name='XBee', | ||
version='2.1.0', | ||
version='2.2.2', | ||
author='Paul Malmsten', | ||
author_email='[email protected]', | ||
packages=packages, | ||
scripts=[], | ||
url='http://code.google.com/p/python-xbee/', | ||
url='https://github.com/nioinnovation/python-xbee', | ||
license='LICENSE.txt', | ||
description='Python tools for working with XBee radios', | ||
long_description=open('README.txt').read(), | ||
long_description=open('README.md').read(), | ||
requires=['serial'], | ||
provides=packages, | ||
) |