Raspberry Pi入门-第一部分(译文)
By robot-v1.0
本文链接 https://www.kyfws.com/pi/getting-started-with-raspberry-pi-part-i-zh/
版权声明 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
- 13 分钟阅读 - 6126 个词 阅读量 0Raspberry Pi入门-第一部分(译文)
原文地址:https://www.codeproject.com/Articles/1147234/Getting-Started-with-Raspberry-Pi-Part-I
原文作者:Hussain Patel
译文由本站 robot-v1.0 翻译
前言
Raspberry Pi - the incredibly small computer of the size of credit card and cost less than $40 has gained popularity not only because of this but its capability for connecting to electronics and devices using the GIPO pins.
Raspberry Pi –信用卡大小的小型计算机,价格不到40美元,因此受到欢迎,这不仅是因为它,而且它还具有使用GIPO引脚连接电子设备的能力.
- 下载文章(Download article) 注意(Note):请投票并添加评论(: Please vote and add comments)
介绍(Introduction)
在本文中,我们将讨论什么是Raspberry Pi,可用的不同类型的电路板,然后进一步了解Raspberry Pi电路板上的各种组件.(In this article, we will talk about what Raspberry Pi is, the different types of boards available and then get up close with the various components on the Raspberry Pi board.)
背景(Background)
Raspberry Pi-令人难以置信的小型计算机之所以受欢迎,不仅是因为它的大小和价格(35美元),还因为它的功能.这是一个令人难以置信的信用卡大小的板,能够运行完整的操作系统(OS),您可以将电子设备连接到设备并对其进行编程.(Raspberry Pi - the small incredible computer has gained popularity not just because on its size and prize ($35), but because of it capabilities. It’s an incredible credit card size board capable of running a full Operating System (OS) and you can connect electronics / devices to it and program them.)
入门(Getting Started)
你好!!!树莓派(Hello!!! Raspberry Pi)
的(The)树莓派(Raspberry Pi)是一款微型计算机(信用卡大小),是在(is a tiny computer (size of a credit card) designed and developed in the)英国(UK).这款微型计算机使每个人(不论大小)都可以学习物理计算,探索基本的电子技术以及学习如何编程(编程).开发Raspberry Pi的主要原因是要教孩子们有关物理计算的知识,让他们了解计算机的工作原理,并使他们对编程产生兴趣.(. This tiny computer enables everyone (big or small) to learn physical computing, explore basic electronics and learn how to program (programming). The main reason behind developing Raspberry Pi was to teach children’s about physical computing, make them understand how computers work and make them interested in programming.) 这是一台计算机-使用Raspberry Pi几乎可以执行任何操作,就像使用普通计算机一样.您可以使用以下语言播放音乐,浏览Internet,运行应用程序,编写程序(It’s a computer - you can do almost anything with a Raspberry Pi, as you would with a normal computer. You can play music, browse the Internet, run applications, write programs using languages like)临时,Python或C#(Scratch, Python or C#)Raspberry Pi可以运行完整的操作系统.有不同的操作系统(etc. The Raspberry Pi is capable of running a full Operating System. There are different OS)(Windows,MAC,Linux版本)((Windows, MAC, Linux version))可以在Raspberry Pi上安装和运行,推荐的操作系统是称为Raspbian的Linux风格的操作系统(由Raspberry的Raspberry基础制造商提供).(that can be installed and run on a Raspberry Pi, the recommended OS is a Linux flavor OS called Raspbian (by Raspberry foundation maker of Raspberry).) 如上所述,Raspberry Pi的大小是一张信用卡,它是一块单板,具有由ARM生产的Broadcom处理器(SOC –片上系统),类似于手机上的处理器. ARM处理器速度快,重量轻. Raspberry pi没有自己的硬盘,键盘,鼠标和显示器.(As mentioned above the size of Raspberry Pi is of a credit card, it a single board that has a Broadcom processor (SOC – system on chip) made by ARM, it’s similar to the processors that is found on mobile phone. The ARM processor is fast and light weight. The Raspberry pi does not have its own Hard Disk, keyboard, Mouse and Monitor.) 硬盘-Raspberry Pi没有自己的硬盘,您需要使用micro SD卡代替硬盘,并且操作系统将安装在这些micro SD卡上. (建议至少2 GB的micro SD卡用于在Raspberry Pi上安装操作系统并运行正常功能).使用微型SD卡的好处是您可以轻松地将此计算机(Raspberry pi)与不同SD卡上的不同操作系统互换. Pi板的底部/底部有一个micro SD卡插槽(Hard Disk - Raspberry Pi does not has its own hard disk, you will need to use micro SD cards in place of the Hard disk, and the OS will be installed on these micro SD cards. (Minimum 2 GB micro SD cards is recommended for installing the OS and running normal functionality on the Raspberry Pi). The benefit of using micro SD card is you can easily swap this computer (Raspberry pi) with different OS’s on different SD cards. There is a micro SD card slot at the underside / bottom of the Pi board) 对于显示器,键盘和鼠标–您可以通过HDMI端口将Raspberry Pi连接到显示器(您可能需要一个(For Monitor, Key board and Mouse – You can connect the Raspberry Pi via the HDMI port to a monitor (you may need an)HDMI转VGA连接器(HDMI to VGA connector)以连接到显示器),并使用其上的USB端口连接键盘和鼠标.使用微型USB连接和5伏输出的电源适配器(用于手机和平板电脑的适配器)为Raspberry供电.它还具有内置的以太网连接以连接到Internet.(to connect to the monitor) and connect the keyboard and the mouse using the USB ports on it. The Raspberry is powered up using a micro USB connection and a power adapter of 5 volt output (adapter used in mobile phones and tablets). It also has built in Ethernet connection to connect to connect to the Internet.)(注意:建议使用有源USB集线器为所有USB设备(如键盘和鼠标等)供电.因为将这些设备直接供电(连接)到Raspberry Pi会使Pi的功率不足,从而导致组件寿命缩短甚至无法工作皮)((Note: It is recommended to use a powered USB hub to power all the USB devices like keyboard and mouse etc. because powering (connecting) these devices directly to the Raspberry Pi would leave the Pi underpowered, leading to shorter component life and even nonfunctioning Pi.)) Raspberry Pi也有很多(The Raspberry Pi is also has bunch of)GPIO(通用输入输出)(GPIO (General Purpose Input Output))引脚是开放的/裸露的,以便我们可以使用它来构建使用传感器的电路. GPIO引脚易于配置和控制,您可以编写程序以读取来自GPIO引脚的传感器数据,并在处理后将数据发送回GPIO引脚.(pins that are open / exposed, so that we can use it to build circuits using sensors. The GPIO pins are easy to configure and control and you can write program to read the sensor data coming from the GPIO pins and send back data to the GPIOs pins after processing.) 目前,市场上有六种不同的Raspberry pi开发板,其中有四种可以在公开市场上购买.(Currently there are six different boards of Raspberry pi available in the Market of which 4 are available for purchase in the open market.) 您可以单独购买这些板,也可以购买一部分(You can purchase these boards as an individual or as part of)启动套件(Startup kits)(建议初学者使用).((recommended for beginners).)启动套件(Startup Kits)包含Raspberry Pi板,带有预安装操作系统的8 GB SD卡,Raspberry Pi盒,电源线,面包板,Wi-Fi加密狗和其他最重要的物品,例如传感器(温度,颜色,光线等),跨接电缆,电容器,电阻器,LED(红色,蓝色和绿色),按钮等.这些启动套件是开始进行一些热门IOT项目的最佳方法.(contain the Raspberry Pi board, 8 GB SD card with pre- installed OS, Raspberry Pi Case, power cables, Breadboard, Wi-Fi dongle and other most essential items like the sensors (Temperature, Color, light etc.), jumper cables, capacitor, resistors, LED’s (red, blue and Green), push buttons etc. These startup kits are best way to start doing some popular IOT projects.) 注意:我建议使用Adafruit的入门工具包(Note: I would recommend a starter kit from Adafruit the) Microsoft IoT套件.(Microsoft IoT kit.) (https://www.adafruit.com/products/2733)((https://www.adafruit.com/products/2733))
以下是四个覆盆子板供参考.(Below are the four raspberry boards for reference.)
-
Raspberry Pi零:(Raspberry Pi Zero:)
- 尺寸:65mm x 30mm x 5mm(Dimensions : 65mm x 30mm x 5mm)
- 重量:9克(Weight : 9g)
- 价格:不到10美元(Price: less than $10) Pi Zero拥有Broadcom BCM2835\1GHz ARM11核心CPU和512 MB RAM,使其功能强大,足以处理小型技术项目.它具有大多数Pi所提供的所有功能.与新版开发板(A型和B型设备)相比,Pi Zero板要小得多. Pi Zero板具有一个微型SD卡插槽,一个用于视频的微型HDMI插槽,一个用于数据和电源的微型USB插槽以及一个未安装的40针GPIO接头(类似于Model A +/B +/2B).(The Pi Zero has a Broadcom BCM2835, 1GHz ARM11 core CPU and 512 MB RAM, making it powerful enough to handle small tech projects. It has all the functionality that most Pi’s have to offer. The Pi Zero board is much smaller compared to the new version boards (Model A and Model B devices). The Pi Zero board is featured with a micro SD card slot, a mini HDMI socket for video, a micro USB socket for data and power and an unpopulated 40 pins GPIO header( similar to Model A+/B+/2B).)
-
Raspberry pi 1 A +型:(Raspberry pi 1 Model A+:)
- 尺寸:65mm x 56mm(Dimensions :65mm x 56mm)
- 重量:23克(Weight : 23g)
- 价格:约20美元(Price: Around $20) Raspberry Pi Model A +由Raspberry基金会于2014年发布.它具有Broadcom BCM2835\700MHz Core CPU和256 MB RAM. Pi A +板具有Micro SD卡插槽,4针立体声输出和复合视频端口,全尺寸HDMI插槽,CSI摄像头端口(Raspberry Pi摄像头模块),DSI显示端口(Raspberry Pi触摸屏显示屏),Micro USB电源连接器用于电源,4个安装孔和40针扩展GPIO接头(The Raspberry Pi Model A+ was released by the Raspberry foundation in the Year 2014. It has a Broadcom BCM2835, 700MHz Core CPU and 256 MB RAM. The Pi A+ board is featured with a micro SD card slot, a 4 pole Stereo output and Composite video port, full size HDMI socket, CSI camera port (Raspberry Pi camera module), DSI display port (Raspberry Pi touch screen display), Micro USB power connector for power, 4 mounting holes and an 40 pins extended GPIO header)
-
Raspberry Pi 2 B型:(Raspberry Pi 2 Model B:)
- 尺寸:85.60mm×56.5mm(Dimensions :85.60mm × 56.5mm)
- 重量:45克(1.6盎司)(Weight : 45g (1.6 oz))
- 价格:$ 35(Price:$35) Raspberry Pi 2 Model B由Raspberry Pi基金会于2015年发布,它是2014年2月发布的Model B +的替代产品.主要的变化是处理器和RAM.它具有Broadcom BCM2836 SOC-片上系统(CPU,GPU,DSP和SD RAM),900MHz四核ARM Cortex-A7 CPU和1 GB RAM. Pi 2 B型板具有MicroSD卡插槽,视频/音频HDMI 1.3和1.4,高清1080p视频输出,复合视频输出(PAL/NTSC),立体声音频输出,以太网端口10/100 Base T RJ45\4 USB 2.0端口,用于Raspberry Pi高清摄像机的15针MPI CSI-2连接器,15针串行显示接口连接器,电源:通过微型USB插孔的+5 V @ 2 A,用于GPIO和串行总线的40针连接器(The Raspberry Pi 2 Model B was released by the Raspberry Pi foundation in 2015, it was a replacement for Model B+ released in Feb 2014. The major changes were the processor and the RAM. It has the Broadcom BCM2836 SOC - System on Chip (CPU, GPU, DSP, and SD RAM), 900MHz quad-core ARM Cortex-A7 CPU and 1 GB RAM. The Pi 2 Model B board is featured with a MicroSD card slot, Video / audio HDMI 1.3 and 1.4, HD 1080p video output, Composite video output (PAL / NTSC), Stereo audio output, Ethernet port 10/100 Base T RJ45, 4 USB 2.0 ports, 15-pin MPI CSI-2 connector for Raspberry Pi HD Video Camera, 15-pin serial display interface connector, Power supply: +5 V @ 2 A via micro USB jack, 40-pin connector for GPIO and serial buses)
-
. Raspberry Pi 3 B型:(. Raspberry Pi 3 Model B:)
- 尺寸:85.60mm×56.5mm(Dimensions :85.60mm × 56.5mm)
- 重量:45克(1.6盎司)(Weight : 45g (1.6 oz))
- 价格:$ 35价格不变(Price:$35 Price hasn’t changed) Raspberry Pi 3 Model B是Raspberry Pi板的最新版本,由Raspberry Pi基金会于2016年3月发布.我通过64位CPU和板载Wi-Fi和蓝牙改善了性能,连接性和电源管理. .它的大小类似于B +和Pi2.Pi 3 Model B板带有MicroSD卡插槽,具有四核1.2GHz Broadcom BCM2837 CPU(64位ARM Cortex A53)和1 GB RAM,具有BCM43143 Wi-Fi(802.11n),低功耗蓝牙(BLE),用于GPIO的40针连接器,4个USB 2.0端口,CSI摄像头端口,DSI显示端口,MicroSD卡插槽,HDMI,4针立体声和复合视频端口,升级的开关电源高达2.4A. Pi 3的性能比Pi 2快约50-60%,这意味着它比原始Pi快十倍.(The Raspberry Pi 3 Model B is the latest of the Raspberry Pi boards and was released by the Raspberry Pi foundation in March 2016. I has the improved performance, connectivity, and power management with a 64- bit CPU and onboard Wi-Fi and Bluetooth. It has size similar to the B+ and Pi 2. The Pi 3 Model B board is featured with a MicroSD card slot, It has the Quad core 1.2GHz Broadcom BCM2837 CPU (64-bit ARM Cortex A53) and 1 GB RAM, It has the BCM43143 Wi-Fi (802.11n), Bluetooth Low Energy (BLE), 40-pin connector for GPIO, 4 USB 2.0 ports, CSI camera port, DSI display port, MicroSD card slot, HDMI, 4 pole stereo and composite video port, Upgraded Switched power source up to 2.4A. The performance of the Pi 3 is roughly 50-60% faster than the Pi 2 which means it is ten times faster than the original Pi.)
现在,我们已经了解了什么是Raspberry Pi,并讨论了Market中可供购买的不同型号.现在,让我们深入研究Raspberry Pi,并讨论Raspberry Pi的解剖结构.以下是图片(Now that we have seen what Raspberry Pi is and discussed the different models available in Market for purchase. Lets’ now deep dive into a Raspberry Pi and discuss the anatomy of Raspberry Pi. Below is picture of)Raspberry Pi 2 B型(Raspberry Pi 2 Model B).(.)
树莓派的解剖(Anatomy of Raspberry Pi)
- DSI:(DSI:)显示接口(DSI)-用于将显示直接连接到Raspberry Pi板上.(The Display Interface (DSI) - is used to connect the display directly to the Raspberry Pi board.)
- GPIO引脚:(GPIO Pins:)这些是40个GPIO(通用输入输出)引脚,可以在Raspberry Pi上直接访问这些引脚.这些用于项目中以将Raspberry Pi连接到电子电路,传感器并进行控制.在运行Raspberry时,可以根据需要打开或关闭这些引脚.(These are 40 GPIO (General Purpose Input Output) pins, these pins can be directly accessed on the Raspberry Pi. These are used in projects to connect the Raspberry Pi to electronic circuits, sensors and control them. These pins can be turned on or off based on the requirement when the Raspberry is running.)
- ARM处理器:(ARM Processor:)它是Raspberry Pi的心脏,它是Broadcom BCM2835 900MHz四核ARM Cortex-A7 CPU,具有1GB RAM.(It’s the heart of the Raspberry Pi, the Broadcom BCM2835 900MHz quad-core ARM Cortex-A7 CPU with 1GB RAM.)
- USB端口:(USB Ports:)USB(通用串行总线)端口用于连接标准配件,例如键盘,鼠标,Wi-Fi适配器等.它具有4个USB端口.(The USB (Universal Serial Bus) ports are used to connect the standard accessories such as keyboard, mouse, Wi-Fi adapter etc. It has 4 USB ports.)(建议使用有源USB集线器为所有USB设备(如键盘和鼠标等)供电.因为将这些设备直接供电(连接到Raspberry Pi上)会使Pi的功率不足,从而缩短了组件的使用寿命,甚至使Pi失效. )((It is recommended to use a powered USB hub to power all the USB devices like keyboard and mouse etc. because powering (connecting) these devices directly to the Raspberry Pi would leave the Pi underpowered, leading to shorter component life and even nonfunctioning Pi.))
- 以太网连接:(Ethernet Connection:)您可以使用以太网电缆和此连接将Pi连接到网络或家用调制解调器/路由器. Raspberry Pi 2 Model B没有内置的Wi-Fi,但是您可以向USB端口添加USB Wi-Fi适配器.(you can connect the Pi to a network or home modem / router using an Ethernet cable and this connection. The Raspberry Pi 2 Model B does not have a built in Wi-Fi, but you can add an USB Wi-Fi adapter to the USB port.)
- 3.5毫米音频/视频插孔:(3.5 MM Audio/Video Jack:)此3.5毫米音频插孔通常用于连接耳机或扬声器.在Raspberry Pi2上,它还使用兼容的电缆传输复合视频.(This 3.5 mm audio jack is normally used to attach headphones or speakers. On the Raspberry Pi2 it also carries composite video using a compatible cable.)
- CSI(相机串行接口):(CSI (Camera Serial Interface):)此接口用于通过CSI连接将Raspberry P1摄像机模块直接连接到主板.(This interface is used to attach the Raspberry P1 Camera module directly to the motherboard via a CSI connection.)
- HDMI:(HDMI:)HDMI连接使您可以将Raspberry Pi连接到最现代的显示器和数字电视.它同时包含视频和音频.(The HDMI connection enables you to hook up the Raspberry Pi to the most modern Monitors and digital Televisions. It carries both the video and audio.)(注意:如果您的旧显示器带有VGA端口,则需要一个HDMI到VGA端口适配器,以将Raspberry Pi连接到旧显示器)((Note: in case you have old monitors having VGA port - you would need a HDMI to VGA port adapter to hook up your Raspberry Pi to the old monitor))
- USB电源:(USB Power:)该端口用于打开Pi的电源. Raspberry Pi使用标准的Micro USB电源.您也可以使用5V 2000mA Micro USB电源和兼容的电缆为Pi供电.(This port is used to power on the Pi. A standard Micro USB power supply is used on the Raspberry Pi. You can also use a 5V 2000mA Micro USB power supply and compatible cable to power up the Pi.)
- 迷你SD卡插槽:(Mini SD Card Slot:)Raspberry Pi没有二级存储,您需要使用微型SD卡来存储数据和OS.这些Pi带有操作系统的SD卡需要先插入SD卡插槽,然后才能给Pi通电.(The Raspberry Pi does not have a Secondary storage, you need to use mini SD cards to store data and OS. These SD cards with OS need be inserted into the SD card slot before powering up the Pi.) 在下一篇文章中,我们将讨论Raspberry Pi模型和优点与缺点之间的区别(In the Next article we will talk about the difference in each of the Raspberry Pi model and the Pros and Cons) 希望这可以帮助.请投票或添加评论.(Hope this helps. Please vote or add comments.)
许可
本文以及所有相关的源代码和文件均已获得The Code Project Open License (CPOL)的许可。
Raspberry 新闻 翻译