树莓派安装与设置的和挑选过教程_第1页
树莓派安装与设置的和挑选过教程_第2页
树莓派安装与设置的和挑选过教程_第3页
树莓派安装与设置的和挑选过教程_第4页
树莓派安装与设置的和挑选过教程_第5页
已阅读5页,还剩12页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

树莓派桌面控制:安装xrdp:sudoapt-getinstallxrdp。然后使用微软的桌面连接ssh登录:1.树莓派安装sshapt-getinstallopenssh-server2.安装成功后,启动sshsudo/etc/init.d/sshstartOpenCVisasuiteofpowerfulcomputervisiontools.HereisaquickoverviewofhowIinstalledOpenCVonmyRaspberryPiwithdebian6-19-04-2012.TheguideisbasedontheofficialOpenCVInstallationGuideonDebianandUbuntu.Beforeyoubegin,makesureyouhaveexpandedyourSDcardtoallowfortheinstallofOpenCV.Itsabigpackagewithlotsofdependencies.Youcanfollowmyinstructionshere.OnceyouhaveexpandedtheSDcard,openupaterminalandinstallthefollowingpackages:sudoapt-get-yinstallbuild-essentialcmakecmake-qt-guipkg-configlibpng12-0libpng12-devlibpng++-devlibpng3libpnglite-devzlib1g-dbgzlib1gzlib1g-devpngtoolslibtiff4-devlibtiff4libtiffxx0c2libtiff-toolssudoapt-get-yinstalllibjpeg8libjpeg8-devlibjpeg8-dbglibjpeg-progsffmpeglibavcodec-devlibavcodec53libavformat53libavformat-devlibgstreamer0.10-0-dbglibgstreamer0.10-0libgstreamer0.10-devlibxine1-ffmpeglibxine-devlibxine1-binlibunicap2libunicap2-devlibdc1394-22-devlibdc1394-22libdc1394-utilsswiglibv4l-0libv4l-devpython-numpylibpython2.6python-devpython2.6-devlibgtk2.0-devpkg-Therearesomedependencyissueswiththeorderoftheinstall,mostlywithregardtolibjpegissues,sobesuretoinstallinthisorder.Youwillseesomebrokenpackageerrorsifyouattempttoinstallallthedependenciesinonestep.Next,pulldownthesourcefilesforOpenCVusingwget:(也可以不用wget,是自己好zip文件然后直接解压缩再进行后面的步骤wgetOncefinisheddownloading,extractthearchive,removethenolongerneededarchive(tosavespace),changedirectorytothetopofthesourcetree,makeadirectoryforthebuild,andchangeintoit:tar-xvjpfOpenCV-2.3.1a.tar.bz2rmOpenCV-2.3.1a.tar.bz2cdOpenCV-2.3.1/mkdirbuildcdNext,youwillneedtoconfigurethebuildusingcmake.Ifyouaren’tsureaboutwhatoptionsyouwant/needorareunfamiliarwithcmake,thislinewillcreateastandardcmake-DCMAKE_BUILD_TYPE=RELEASE-DCMAKE_INSTALL_PREFIX=/usr/local-DBUILD_PYTHON_SUPPORT=ON-DBUILD_EXAMPLES=ON..Alternatively,youcanconfigurethebuildusingaGUIinterface.ThiscanbehelpfultobuildwithsupportforadditionalOpenCVfeatures.TousethecmakeGUI,run:cmake-gui..InthecmakeGUI,click‘configure’topre-populatethebuildoptions.Selectorremoveanydesiredfeatures,thenclick‘configure’again,checktheoutputandensurethattherearenotanymodulesthatcmakecannotfind.Ifeverythinglooksgood,click‘generate’tocreatethemakefiles,thenclosecmake-gui.Nowwearereadytostartthebuild!Tocompile,runmake,theninstallwithmakeinstall:sudomakeAsyoucanseefromtheimage,thiswilltakeaLONGtime…overfourandahalfhourstocompile!Finally,weneedtomakeafewconfigurationsforOpenCV.First,opentheopencv.conffilewiththefollowingcode:sudonanoAddthefollowinglineattheendofthefile(itmaybeanemptyfile,thatisok)andthensaveit:Theneditthesystem-widebashrcsudonanoAddthefollowingnewlinestotheendofthefile:Nowthateverythingisinstalledandconfigured,ontothedemos!TheCdemosarecd~/opencv/OpenCV-Cdemosinbuild/bindemosworthcheckingout(thatdon’trequire Thepythondemosarelocatedincd~/opencv/OpenCV-Thesedemosalsodon’trequireapython./minarea.pypython./drawing.py高级包装工具(英语:AdvancedPackagingTools,简称:APT)是Debian及其衍生发行版(如:ubuntu)的软件包管理器。APT可以自动,配置,安装二进制或者源apt-get选项apt-get选项install|removepkg1pkg2apt-get[选项]sourcepkg1[pkg2...]updateupgrade-进行更新remove-移除软件包autoremovepurgesource-源build-depdist-upgrade-版升clean-清除的归档文autoclean-清除旧的的已的归档文-d仅-不安装或解压归档文-capt-cachesearchpackagenameapt-cacheshowpackagenameapt-getinstallpackagenameapt-getinstallpackagenamereinstallapt-getfinstall修复安装”-f–fix-missing”apt-getremovepackagename删除包apt-getremovepackagenamepurgeapt-getupdateapt-getupgradeapt-cachedependspackagenameapt-cacherdependspackagenameapt-getsourcepackagename该包的源代apt-getcleanapt-getautocleanapt-getchecknanoDebian等系统中直接默认安装。它体积小、操作方便、上手快,在编辑文nano的人们能够尝试这款文本编辑nanoPicoPiconano|GNUnano|文件名:×××|已更改|||||||||##常用快捷键nanoEmacs通用。其实,Emacs^G:^ControlM-G:MAlt^X^O^R^W^Y^V^K^U^CMM-|MMM-GM-RM-AM-WM-^M-6MM^F^B^SpaceM-Space^P^N^A^EMM-9跳至当前段落开头,如已在段落开头,则调至上一段落起始处M-)(M-0)跳至当前段落结尾,如已在段落结尾,则调至下一段落结尾M-]移动至对应括号^M^D^HM-D计算字数、行数与字符数##nano辅助功能说明a:^Space按键可能与中文输入法调出按键,如,则该按键组合在/etc/nanorcsethistorylog$sudonanoetc/nanorcsethistorylog,保存退出#sethistorylog$sudorm 关于树莓派与ArduinoUno如何对接,网络上的资料很少,经本人研究三接、GPIO方式对接、I2C方式对接、其他)。Arduino:开发环境我是用arduino-0023现在是arduino1.0.5版本这)(如果连接失效请用迅雷或自己)以上软件x86x64都可以安XP与WIN7都没问题,在WIN864下有可能遇到驱动无法使用问题,两个库文件RPi.GPIO与serial安装python(安装过的请跳到下一步):sudoaptitudeinstallpython-wgetRPi.GPIO-0.3.1a.tar.gz(GPIO库tarxvzfRPi.GPIO-0.3.1a.tar.gz(tar解压cdRPi.GPIO-0.3.1a进入解压后的文件夹sudopythonsetup.pyinstall安装GPIO库文件sudoapt-getinstallpython-sudoapt-get 启动出现配置菜单:选serialport输入E配置速率为96008N1输入FHardwareFlowControl 作为超级终端控制路由器等设备,而不是控制modem,所以需要修改Modemanddialing,将Initstring,Resetstring,Hang-upstring设置为空.设置完成后选择Savesetupasdfl将当前设置保 在配置菜单选Savesetupasdf1保存(一定要记得这一步)选Exit退出下次在输入minicon即可直接进入。 明/dev/ttyAMA0对应为串口0为你连接开发板的端口sudonano或用xwindow下用pythonIDE打开一个空的文件importimportpythonls这个。如果两者没有连接是不会有的)的系统一般都会自动生成。看到ttyACMO就说明二者可以通讯了接下来上测试代码bytenumber=void4.voidif(Serial.available())number=Serial.print("characterrecieved: importser=serial.Serial('/dev/ttyACM0',9600,whileresponse=printexcept保存xxx.py1.2.3.Arduionpin0(rx)pin1(tx)的进行对接(这个淘宝上有一个5元钱)要实在没 树莓派python代码改动一下就是把ttyACM0改为ttyAMA0其他的不importser=serial.Serial('/dev/ttyAMA0',9600,whileresponse=printexcept里http sudonanodwc_otg.lpm_enable=0console=ttyAMA0,115200kgdboc=ttyAMA0,115200console=tty1root=/dev/mmcblk0p2rootfstype=ext4elevator=deadlinerootwait把console=ttyAMA0,115200kgdboc=ttyAMA0,115200dwc_otg.lpm_enable=0console=tty1root=/dev/mmcblk0p2rootfstype=ext4elevator=deadlinerootwaitctrl+xYsudonanoT0:23:respawn:/sbin/getty-LttyAMA0115200这一行面加个#注释掉这一行变#T0:23:respawn:/sbin/getty-Ltt

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论