File Exchange

image thumbnail

Wireless control and monitoring of an LED using XBee

Acquire data from wireless sensors using Xbee from MATLAB

16 Downloads

Updated

View License

In this example, MATLAB® is used to wirelessly control an LED using two XBee® Series 2 modules. A mini photocell is used to wirelessly monitor the state of the LED. The example illustrates how you can control,acquire and analyze data from sensors that are connected wirelessly through XBee modules.
XBee is a registered trademark of Digi International, http://www.digi.com

Comments and Ratings (12)

tamo Toto

I have an XBee THT Grove Development Board, and xbee s1. I'm trying to read out the analog and digital pin with Matlab already from few days.
I always get these error messages:
"No response from your remote node. Check the destination address or SIFS parameter if you want to increase the waiting
Time. "
"Responses = obj.remoteAtCommand (command, destadd);"
"[CurPinMode, sources] = obj.getPinMode (pin, destadd);"
Can someone help me
Thank you

Hello! Thank you very much for very useful file!
I want to get data from remote xbee, which is connected with arduino by RX TX, and how I understand I need use function output = extractFrameData(frameData, remoteATCommand), but I don't know Which remote AT Command I should use. I will appreciate for any help.

vidtor sirip

hi,
I'm trying to need throughput, delay and packet loss.
how can i do it. pleas help me.

hello!
i'm trying to send data from arduino to matlab using Xbee SERIES 1 802.15.4
how can i do it? and what matlab code should i use?
thanks ahead

ricardo ortiz

hi, im trying to use the plug for creating an Xbee object but Matlab does not recognise the command. is there any other package i need t install before being able to use this feature ?? please help.

>> x = xbee('COM6');
Error using xbee
Error: File: xbee.m Line: 4 Column: 5
Unexpected MATLAB expression.

Donghai Wang

i'm new to xbee programming

wonder to know what's difference for AT mode or API mode in matlab coding -- can you point me which code depends on API mode?

thanks

Benjamin Kraus

@Tim: This code was written specifically for the series 2 XBees running in API mode, so it will not work with series 1 XBees. However, if you have series 1 XBees (or series 2 XBees running in AT mode), you should be able to use the "serial" function/object directly without any special wrapper. Try:

>> doc serial

Regarding your keyboard: This is just a guess (I am not familiar with this aspect of Macs, but I am familiar with Linux, I'm guessing they are similar), but you are most likely providing the wrong address for the serial port. Instead of providing the address for the XBees, you are giving it the address for your keyboard. Try incrementing the number at the end of the serial port address until it works (with the "serial" command, it won't work with the "xbee" command).

Gellela

Would Matlab R2013a be able to recognize the word 'xbee' or do I need a latest version of matlab?

Tim

Tim (view profile)

I have two Xbees S1 and want to transmit sensor data to Matlab.
Does the xbee class also work with S1-series? Are there any known issues?

As soon as I create the Xbee object, my keyboard (OS X 10.10) stops working. Any ideas on that?

Camilo

Camilo (view profile)

Eun Kyung Lee

Updates

1.3

Updated description and file.

MATLAB Release
MATLAB 8.2 (R2013b)
Communities

More Files in the  Maker Community

MATLAB Online Live Editor Challenge

Win cash prizes and have your live script featured on our website

Learn more

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video