Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. pip install xbee
  2.  
  3. #! /usr/bin/python
  4.  
  5. # Import and init an XBee device
  6. from xbee import XBee,ZigBee
  7. import serial
  8.  
  9. ser = serial.Serial('/dev/ttyUSB0', 9600)
  10.  
  11. # Use an XBee 802.15.4 device
  12. # To use with an XBee ZigBee device, replace with:
  13. #xbee = ZigBee(ser)
  14. xbee = XBee(ser)
  15.  
  16. # Set remote DIO pin 2 to low (mode 4)
  17. xbee.remote_at(
  18. dest_addr='x56x78',
  19. command='D2',
  20. parameter='x04')
  21.  
  22. xbee.remote_at(
  23. dest_addr='x56x78',
  24. command='WR')
  25.  
  26. ImportError: cannot import name Xbee
  27.  
  28. pip search xbee
  29.  
  30. egenix-mx-base - eGenix mx Base Distribution for Python -
  31. mxDateTime, mxTextTools, mxProxy, mxTools,
  32. mxBeeBase, mxStack, mxQueue, mxURL, mxUID
  33. XBee - Python tools for working with XBee radios
  34. INSTALLED: 2.1.0 (latest)
  35. hachi - XBee API
  36. txXBee - XBee Protocol for Twisted
  37. pyctu - A curses interface to configure xbees
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement