mbed_matlab_lib
所属分类:matlab编程
开发工具:matlab
文件大小:29KB
下载次数:1
上传日期:2020-04-20 17:43:16
上 传 者:
krimo23000
说明: mbed library for matlab exemple interfacing with serial port (rs232)
matlab commuication with microcontroller (UART Communication) ex :
import mbed.*
mymbed= SerialRPC('COM5', 9600);
myled = DigitalOut(mybed, LED1);
文件列表:
add_mbed_to_path.m (669, 2010-11-11)
+mbed\AnalogIn.m (4717, 2011-02-22)
+mbed\AnalogOut.m (4839, 2011-02-22)
+mbed\Contents.m (1416, 2011-02-22)
+mbed\DigitalIn.m (4900, 2011-02-22)
+mbed\DigitalOut.m (4793, 2011-02-22)
+mbed\HTTPRPC.m (4381, 2011-02-22)
+mbed\LED1.m (52, 2010-11-01)
+mbed\LED2.m (52, 2010-11-01)
+mbed\LED3.m (52, 2010-11-01)
+mbed\LED4.m (52, 2010-11-01)
+mbed\PinName.m (1525, 2010-11-08)
+mbed\PwmOut.m (7807, 2011-02-22)
+mbed\RPCConnection.m (1767, 2010-11-08)
+mbed\RPCFunction.m (1855, 2010-09-23)
+mbed\RPCVariable.m (2332, 2010-09-23)
+mbed\Serial.m (7874, 2011-02-22)
+mbed\SerialRPC.m (5904, 2011-02-22)
+mbed\TestRPC.m (3311, 2011-02-22)
+mbed\p10.m (51, 2010-11-01)
+mbed\p11.m (51, 2010-11-01)
+mbed\p12.m (51, 2010-11-01)
+mbed\p13.m (51, 2010-11-01)
+mbed\p14.m (51, 2010-11-01)
+mbed\p15.m (51, 2010-11-01)
+mbed\p16.m (51, 2010-11-01)
+mbed\p17.m (51, 2010-11-01)
+mbed\p18.m (51, 2010-11-01)
+mbed\p19.m (51, 2010-11-01)
+mbed\p20.m (51, 2010-11-01)
+mbed\p21.m (51, 2010-11-01)
+mbed\p22.m (51, 2010-11-01)
+mbed\p23.m (51, 2010-11-01)
+mbed\p24.m (51, 2010-11-01)
+mbed\p25.m (51, 2010-11-01)
+mbed\p26.m (51, 2010-11-01)
+mbed\p27.m (51, 2010-11-01)
+mbed\p28.m (51, 2010-11-01)
+mbed\p29.m (51, 2010-11-01)
... ...
MATLAB Interface to mbed
1. Add the mbed package (aka. namespace) to your MATLAB path
The folder containing this README.txt file should also have
a MATLAB function, add_mbed_to_path.m. Run this function:
>> add_mbed_to_path
2. Make sure your mbed has the RPC server code. Go to this page:
http://mbed.org/cookbook/Interfacing-Using-RPC
and follow the instructions in the "RPC over Serial" section.
3. To access the mbed class or variable, you need to prefix the
classname with "mbed.", e.g., mbed.SerialRPC or mbed.LED1.
Use "import mbed.*" to avoid having to specify the namespace
every time.
BEFORE
mymbed = mbed.SerialRPC('COM5',9600);
ao = mbed.AnalogOut(mymbed, mbed.p18);
AFTER
import mbed.*
mymbed = SerialRPC('COM5',9600);
ao = AnalogOut(mymbed, p18);
4. To get help on the mbed classes, type the following
>> help mbed
Also see the mbed MATLAB web page:
http://mbed.org/cookbook/Interfacing-with-Matlab
----
近期下载者:
相关文件:
收藏者: