三轴力传感器数据在MATLAB中实时显示

三轴力传感器数据在MATLAB中实时显示 演示视频: http://v.youku.com/v_show/id_XNTAwODg3Njc2.html 使用了嵌入式PAL Board作为数据采集装置,搭载ADI公司的ADXL345三轴力传感器。使用串口RS232传输数据到MATLAB,MATLAB建立串口对象,每上来一组数据就调用一次回调函数。回调函数实现绘图的功能。Enjoy! 本例程是修改自:MATLAB动画显示串口数据【实例】 Display the real-time data acquired form 3-axis accelerometer sensor in MATLAB Demo video: http://www.youtube.com/watch?v=YoBn7LAtDrU Used the embedded PAL board to capture the accelerometer data. The board contains the 3-axis accelerometer sensor ADXL345 produced by Analog Devices. Sent the data to MATLAB through serial port. Built the serial object in MATLAB. Call the callback function when the data generated. The callback function realize the plotting function. Enjoy! Explorer More: MATLAB 3D 动画制作(一)- 3D 图形设计

READ MORE

三轴力传感器数据在MATLAB中实时显示

2013-01-12_三轴力传感器数据在MATLAB中实时显示 演示视频: http://v.youku.com/v_show/id_XNTAwODg3Njc2.html 使用了嵌入式PAL Board作为数据采集装置,搭载ADI公司的ADXL345三轴力传感器。使用串口RS232传输数据到MATLAB,MATLAB建立串口对象,每上来一组数据就调用一次回调函数。回调函数实现绘图的功能。Enjoy! 本例程是修改自:MATLAB动画显示串口数据【实例】 Display the real-time data acquired form 3-axis accelerometer sensor in MATLAB Demo video: http://www.youtube.com/watch?v=YoBn7LAtDrU Used the embedded PAL board to capture the accelerometer data. The board contains the 3-axis accelerometer sensor ADXL345 produced by Analog Devices. Sent the data to MATLAB through serial port. Built the serial object in MATLAB. Call the callback function when the data generated. The callback function realize the plotting function. Enjoy! Explorer More: MATLAB 3D 动画制作(一)- 3D 图形设计

READ MORE

Fedora-Ubuntu 修改字体方法

Fedora-Ubuntu 修改字体方法 fedora(Ubuntu)下安装新字体倒也简单。 1.首先下载你喜欢的字体,后缀名应该是ttf, 2.然后将文件或文件夹拷贝到linux中/usr/share/fonts目录下,你也可以在该目录下新建子目录,如:sudo mkdir -p chinese/yahei 3.在/usr/share/fonts/chinese目录下执行下面3条语句。(关于3条语句功能,可搜索之。) 1. sudo mkfontscale 2. sudo mkfontdir 3. sudo fc-cache -fv 4.安装完以后注销,再次登陆字体就可用了,但是要设置字体,我们还需要安装一个工具gnome-tweak-tool,傻瓜式安装: sudo yum install gnome-tweak-tool 5.然后应用程序里多了一项"高级设置",打开它就可以设置字体了,也可以在终端输入gnome-tweak-tool打开。设置字体是傻瓜式的,这里不再废话,重要的是如何设置字体,使得中文使用微软雅黑字体,英文使用Ubuntu Mono(或者你喜欢的其他英文字体,Monaco也是一个很不错的编程字体) 你可以在最适合编程的十大字体里面选择一个你特别喜欢的,或者像我一样使用Ubuntu Mono字体,然后按照上面的方法安装新字体,打开gnome-tweak-tool这个工具,进行如下设置: 这样设置以后就可以实现中文使用微软雅黑,英文使用更适合编程的字体了,这里要友情提醒的是,终端--配置文件首选项--常规选项卡里也是可以修改字体的,不过新安装的字体不在里面,只能修改成系统自带的字体,所以这里最好使用默认设置。 参考:https://github.com/lalor/note/blob/master/fedoraFAQ.md

READ MORE

win7系统使用日常经验集锦

win7系统使用日常经验集锦 win7系统使用日常经验集锦 Win7 禁止升级到Win8/Win10 How to remove Windows 10 upgrade updates in Windows 7and 8 怎样移除windows7 / windows8 里 自动升级到 windows10 的相关程序 By Martin Brinkmannon April 17, 2015 in Tutorials - Last Update: June 1, 2015 65 Microsoft will ship Windows 10 later this year and with it comes an offerto upgrade existing versions of Windows to the operating system for free. Since the majority of Windows users probably does not know about that offer as they may not read tech sites at all or only sporadically, Microsoft pushed updates to Windows 7 and Windows 8 systems that prepare the system forthe update.

READ MORE

win7与VMware/VBox下linux共享文件夹方法

在Windows7系统环境下,用vmware安装好Ubuntu10.04系统后,Ubuntu默认是安装有Vmware Tools的。在这种情形下,有两种方法来共享Win7系统下的文件夹与文件。 采用“拖拉”方式。Vmware很智能,可以直接将Win7下的文件拖进Ubuntu系统里。 采用“共享文件夹”方式。首先,在Vmware下,设定好Win7的共享文件夹路径。然后,在Ubuntu系统下,执行: sudo vmware-config-tools.pl 一般需要安装linux-header,执行命令如下: sudo apt-get install linux-headers-uname -r 最后,在Ubuntu的/mnt/hgfs/文件夹下就可以看见Win7的文件了。 如果使用secureCRT连接不到你的虚机, Server版需要安装ssh-server,命令:sudo apt-get install openssh-server ,下次重启需要手动启动:sudo/etc/init.d/ssh start ---------------------------------------- WIN7下Virtualbox虚拟Ubuntu, 共享文件夹设置 ---------------------------------------- sudo mount -t vboxsf games /mnt/share 找了好久找到一个比较完善的共享文件夹的方法 希望对大家有用  我ubuntu是新氧的ubuntu 9.04,sun vitualbox/ Ubuntu 12.04官方iso也亲测过。 1. 安装增强功能包(VBoxGuestAdditions) 打开虚拟机,设置ubuntu9.04,找到光驱选项加载VBoxGuestAdditions。iso.(该镜像就在虚拟机的安装目录下面),确定 运行ubuntu,在光驱下就会有VBoxGuestAdditions镜像,打开镜像,运行autorun.sh,系统就会自动安装,安装完毕后会提示要重启Ubuntu。 2. 设置共享文件夹 有两种设置共享文件夹的方法,1运行Ubuntu前对其进行设置,打开设置选项-数据空间,右边有加载文件夹选项,加载一个共享文件夹,比如D:\games,确定 2 在Ubuntu已经运行时加载,在Ubuntu界面的右下角有一个文件夹选,右击可以加载 3. 挂载共享文件夹 重新进入虚拟Ubuntu,在命令行终端下输入: sudo mkdir /mnt/shared sudo mount -t vboxsf games /mnt/shared 其中"games"是之前创建的共享文件夹的名字。 注意:当虚拟机linux系统关机以后,下次使用需要重新挂载。OK,现在Ubuntu和主机可以互传文件了。    假如您不想每一次都手动挂载,可以在/etc/fstab中添加一项     games /mnt/shared vboxsfrw,gid=100,uid=1000,auto 0 0     这样就能够自动挂载了。     或者你虚拟机linux系统不关机,关闭虚拟机的时候,选“save the machinestate.” 4. 卸载的话使用下面的命令: sudo umount -f /mnt/shared 注意: 共享文件夹的名称千万不要和挂载点的名称相同。比如,上面的挂载点是/mnt/shared,如果共享文件夹的名字也是shared的话,在挂载的时候就会出现如下的错误信息(看http://www.

READ MORE

MATLAB动画显示串口数据【实例】(修正链接)

function callback(s,BytesAvailable,p) global i; global t; global x; global m; % p = plot(t,m,… % 'EraseMode','background','MarkerSize',5); out = fscanf(s) %read data from s data = str2num(out); if data>-2 & data < 2 %detect if data is legal % disp('*******data comes! \n'); t=[t 0.01*2*pi*i]; %0 0.1 0.2 0.3.. %Matrix 1*(i+1), column is increasing m=[m data]; %Matrix 2*(i+1), 2row, i+1 column. %http://blog.csdn.net/sonictl %set(p(1),'XData',t,'YData',m(1,:)) %set(p(2),'XData',t,'YData',m(2,:)) set(p,'XData',t,'YData',m(1,:)) %http://blog.csdn.net/sonictl drawnow x = x + 3.6/360*2*pi; % x = x+0.1 axis([x x+2*pi -1.5 1.5]); pause(0.1); i = i+1; end %http://blog.

READ MORE

Ubuntu配置上位机Blackfin开发环境手记

Ubuntu配置上位机Blackfin开发环境手记 ——– 本文档适合使用Ctrl+F 搜索关键字 ————– ——– It‘s more convenient to this message by searching key word with Ctrl+F ——- My note for configuring the Software Development Environment(SDE) for TLL board on Ubuntu 12.04 Ubuntu配置上位机Blackfin开发环境手记: [参考]http://blog.csdn.net/cp1300/article/details/8205282 【Section 0: Working Aim 工作目的】 现在手里有一个嵌入式开发板,搭载的是 AnalogDevices 公司的 Blackfin527 Processor,预装板载Uclinux操作系统。现在要配置上位机Linux/Ubuntu12.04 的开发环境,包括BlackfinToolchain,Eclipse开发环境,和Library. 【Section1: Install Toolchain】 Install Blackfin Toolchain Refer to the Note after this section if you meet some issueduring this installation. 1.1 Package Installation (recommended) l Get the latest Blackfin Toolchain from ADI l Current up to date version is: 2011R1-RC4

READ MORE

【技术】Ubuntu上位机配置Blackfin开发环境手记

【技术】Ubuntu上位机配置Blackfin开发环境手记 Ubuntu配置上位机Blackfin开发环境手记:[参考]http://blog.csdn.net/cp1300/article/details/8205282 My note for configuring the Software Development Environment(SDE) for TLL board on Ubuntu 12.04 【Section 0: Working Aim 工作目的】 现在手里有一个嵌入式开发板,搭载的是 AnalogDevices 公司的 Blackfin527 Processor,预装板载Uclinux操作系统。现在要配置上位机Linux/Ubuntu12.04 的开发环境,包括Blackfin Toolchain,Eclipse开发环境,和Library. 【Section1: Install Toolchain】 Install Blackfin Toolchain Refer to the Note after this section if you meet some issue during this installation. 1.1 Package Installation (recommended) · Get the latest Blackfin Toolchain from ADI · Current up to date version is: 2011R1-RC4 · Example download command: wgethttp://blackfin.uclinux.org/gf/download/frsrelease/531/9508/blackfin-toolchain-2011R1-RC4.i386.rpm wgethttp://blackfin.uclinux.org/gf/download/frsrelease/531/9512/blackfin-toolchain-elf-gcc-4.3-2011R1-RC4.i386.rpm · Check if a previous toolchain is already installed

READ MORE

[转载]Matlab中使用Plot函数动态画图方法总结

[转载]Matlab中使用Plot函数动态画图方法总结  (2012-12-31 23:26:18)[删除] 转载▼ 标签:  转载 分类: 技术相关 原文地址:Matlab中使用Plot函数动态画图方法总结作者:gypsy Matlab中使用Plot函数动态画图方法总结 Matlab除了强大的矩阵运算,仿真分析外,绘图功能也是相当的强大,静态画图没什么问题,由于Matlab本身的多线程编程缺陷,想要动态的画图,并且能够很好的在GUI中得到控制,还不是一件很容易的事情,下面总结几种方法。 一. AXIS 移动坐标系     这种方法是最简单的一种方法,适合于数据已经全部生成的场合,先画图,然后移动坐标轴。实例代码如下: %% %先画好,然后更改坐标系 %在命令行中 使用 Ctrl+C 结束 t=0:0.1:100*pi; m=sin(t); plot(t,m); x=-2*pi; axis([x,x+4*pi,-2,2]); grid on while 1 if x>max(t) break; end x=x+0.1; axis([x,x+4*pi,-2,2]); %移动坐标系 pause(0.1); end 二. Hold On 模式              此种方法比较原始,适合于即时数据,原理是先画上一帧,接着保留原始图像,追加下一幀图像,此种方式比较繁琐,涉及画图细节,并且没有完整并连续的Line对象数据。    例如: %% % Hold On 法 % 此种方法只能点,或者分段划线 hold off t=0; m=0; t1=[0 0.1]; %要构成序列 m1=[sin(t1);cos(t1)]; p = plot(t,m,'*',t1,m1(1,:),'-r',t1,m1(2,:),'-b','MarkerSize',5);    x=-1.5*pi; axis([x x+2*pi -1.5 1.5]); grid on; for i=1:100     hold on     t=0.1*i; %下一个点     m=t-floor(t);     t1=t1+0.1; %下一段线(组)

READ MORE

camera Calibration A robot(XY moving platform) is holding a camera. How can I get the coord of an obj in picture captured by camera. 1. Simplest situation simplest situation is linear calibration. It output a linear scale for your coord tranformation. picture 1: picture 2: +-----------------------+ +-----------------------+ | | | | | | camera moving left | | | +----+ | | +----+ | | |obj | | ------------------> | |obj | | | | | | | | | | | +----+ | | +----+ | | | | | | | | | +-----------------------+ +-----------------------+ for picture 1 : we have a robot_coord(2, 0), obj_px_coord(30, 60)

READ MORE