MATLAB Arduino Tutorial 6 - Wireless Xbee Communication based Data-Logging for 3-axis Accelerometer

preview_player
Показать описание
Wireless data-logging is an important requirement for several systems. This video demonstrates how to use MATLAB to collect data from a 3-axis accelerometer using wireless Xbee communication. The accelerometer is connected to the Arduino UNO board that also houses a XBee Series 1 (2.4 Ghz, IEEE 802.15.4) radio that is interfaced using an XBee Explorer USB and XBee Shield for Arduino UNO. Another XBee Series 1 (2.4 Ghz, IEEE 802.15.4) is connected to a computer that runs MATLAB using the XBee Explorer USB. Using this configuration, MATLAB can be used to collect readings of the 3-axis accelerometer serially via the wireless communication link.

Configuration:
- Matlab R2012a
- Arduino 1.0.1
- USB 2.0
- Freescale MMA7341L
- XBee Series 1 (2.4 Ghz, IEEE 802.15.4)
- XBee Explorer USB
- XBee Shield for Arduino UNO

Рекомендации по теме
Комментарии
Автор

I have typed out the Matlab and Arduino scripts, and the serial communication doesn't work for me. After running the Matlab script I get the following warning messages:
Warning: "Unsuccessful read: The specified amount of data was not returned within the Timeout period.
Warning: Unsuccessful read: A timeout occurred before the Terminator was reached."

It then seems to connect, but when I use "fread(s)" it returns with:
"Warning: Unsuccessful read: The specified amount of data was not returned within the Timeout period.. 
ans =
   Empty matrix: 1-by-0"

Does there need to be any setup done in the XCTU program? Assistance is greatly appreciated.

edwardhallett
Автор

For those wanting a script below, are you after a Matlab or Java Processing script? Please reply to this comment.

edwardhallett
visit shbcf.ru