Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
1,144 Views

Intel Edison + XBee (with Python 2.7)

Hello everyone,

I'll try to explain myself:

I'm trying to connect an XBee (S1) with the Intel Edison, i've already worked with the AT Communication through Serial... but I want to know if I can make it with a Python Script.

I've found this script (it's like the typical (?) example on the web):

# ! /usr/bin/python

# 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

xbee = XBee(ser)

# To use with an XBee ZigBee device, replace with:

# xbee = ZigBee(ser)

# Set remote DIO pin 2 to low (mode 4)

xbee.remote_at(

dest_addr=b'\x56\x78',

command='D2',

parameter=b'\x04')

xbee.remote_at(

dest_addr=b'\x56\x78',

command='WR')

But the thing it's the "/dev/ttyUSB0"... I'm working with an Arduino Shield "Bees Shield v2.12" (Seeed Studio) and I want to know if there's a way through Python to manage the GPIOs in this Shield...

Sorry for my language, i'll be waiting your replys.

Thanks in Advance.

0 Kudos
2 Replies
idata
Community Manager
49 Views

Hi FelipeDelgado,

Thanks for your interest Intel® Edison™ Platform.

From your reply I understand that you are able to connect your XBee through serial communication and now you want to create your own Python code in order to control it. Then in order to control it, you need to interact with the Edison GPIO, if this is your question, I would encourage to follow the mraa sample code in python https://github.com/intel-iot-devkit/mraa/tree/master/examples/python mraa/examples/python at master · intel-iot-devkit/mraa · GitHub .

If I don't understand your issue, could you be so kind to elaborate a little bit more your problem.

We will be waiting for your reply, have a great day!

Best Regards,

 

-Jose P.
idata
Community Manager
49 Views

Hi FelipeDelgado,

 

 

Were you able to manage the GPIO of your Edison using Phyton? Please let us know in order to assist you.

 

 

We will be waiting for your reply, have a nice weekend!

 

 

Best Regards,

 

-Jose P.
Reply