如果您正在计划一个新的技术项目,并且您正在寻找一台可以充当设计大脑的小型单板计算机,您可能会考虑以下两种设备之一:Raspberry Pi或 Arduino。两者都面向希望以低成本构建令人兴奋的新项目的专业人士和业余爱好者。(exciting new projects)
Raspberry Pi和Arduino板都有优点、缺点和理想的用例,具体取决于您的项目要求。如果您不确定在Ardunio与Raspberry Pi之间的战斗中哪个板最好,这里有一个帮助您决定的流程。
性能和规格(Performance and Specifications)
如果您正在考虑更换 PC 板,我们现在会回答您:Raspberry Pi是唯一的选择(至少与Arduino相比)。最新的Raspberry Pi 4和 4B 提供 1GB 和 8GB 的 RAM以及四核 1.5GHz ARM v8 处理器,您可以在一个非常小的板上获得大量的功率。
即使是较小的 Pi 型号(零(Zero)瓦和零瓦(Zero W)板)也可以为其尺寸提供强大的功率,配备 1GHz ARM CPU、512MB RAM、用于扩展的GPIO接头以及集成的WiFi和蓝牙(Bluetooth)支持。
与 Pi 一样,有各种Arduino模型,Arduino Uno为非常特定的项目提供非常小的 2KB SRAM和 16MHz 微控制器。规模的另一端是Arduino Portena H7,具有双核Cortex M7+M4 ARM内存(RAM)介于 8MB 和 64MB 之间,并集成了蓝牙(Bluetooth)和WiFi。
这是一个公平的比较吗?可能不会,因为Raspberry Pi和Arduino是两种截然不同的产品。Arduino是用于定制硬件项目的可定制、可编程板,而Raspberry Pi(Raspberry Pi)本身就是一种更“传统”的计算机,支持各种 Linux 发行版(various Linux distros)和合适的硬件启动。
速度和性能是 Pi 的胜利,但Arduino不需要运行Raspberry Pi(具有完整的Linux发行版)必须运行的所有复杂应用程序。唯一公平的比较可能是Raspberry Pi Pico ,这是一款具有双核ARM Cortex M0+处理器和 264KB RAM的爱好者微控制器(microcontroller)板。
功能性(Functionality)
正如我们已经提到的,Raspberry Pi是一款功能强大的计算机。虽然早期型号(从原始 Pi 到Raspberry Pi 3)可以说相当慢,但最新型号(Raspberry Pi 4和 4B)提供了巨大的性能增强。
这使您可以用Raspberry Pi替换您的工作 PC 。它不适合游戏(复古游戏(retro gaming)除外)或视频编码,但它是功能齐全的服务器或 PC。它还可以集成到任何数量的项目中,无论是建造气象站还是作为机器人构建的神经中枢。
Arduino在某些方面没有相同的功能,但它针对的是不同的受众。如果您是一名熟练的编码员,您可以对您的Arduino进行编程以执行您喜欢的任何任务。它可以变成遥控汽车、家庭警报器、通信系统——只要连接正确的设备,所有这些都是可能的。
扩展Arduino是发挥其背后真正力量的最佳方式。如果您对编码感到满意,那么这是构建廉价而简单的项目的好方法。然而,Raspberry Pi提供了许多相同的优势,具有许多附加板(称为HAT(HATs)),可以放置在板本身的 40 针GPIO接头上。(GPIO)
您可能会根据尺寸或功率要求选择 Arduino,但如果您需要性能和功能,Raspberry Pi是总体赢家。
可用性(Usability)
尽管Arduino和Raspberry Pi是具有很大潜力的电路板,但这并不意味着它们特别难以使用。这两个委员会都起源于教育,创建 Pi 是为了帮助学校和家长重新引入 80 年代风格的好奇心,鼓励孩子们学习编码。
作为微控制器板,Arduino是初学者的梦想。Arduino网站本身提供教程和示例代码来帮助您创建新项目。虽然Raspberry Pi允许用户一次做很多事情,但Arduino专注于由用户创建和编码的单一目的。
不幸的是,Arduino使用 C++ 作为其代码的主要语言。这不是最容易学习或使用的语言,不像Raspberry Pi完全支持的初学者友好Python(以及其他主要编程语言)。
如果编程不适合您,那么您也不需要使用Raspberry Pi进行编程。安装Raspberry Pi OS或其他Linux发行版将为您提供完整的操作系统,包括允许您运行标准软件(如Google Chrome或LibreOffice )的图形用户界面。
即使从终端控制和使用Raspberry Pi也更容易。Linux 终端命令(Linux terminal commands)很容易学习,但如果你想避免它,你可以——这就是Raspberry Pi的成功之处,它为初学者和业余爱好者提供了非常低的入门门槛。
不幸的是, Arduino不能这样说。然而,如果你准备好接受更艰难的学习曲线,它可能是一个伟大的新项目构建的核心,但Raspberry Pi会让你更快地到达那里。
成本(Cost)
功率和可用性是一回事,但成本很重要,尤其是对于预算有限的业余爱好者项目。值得庆幸的是,Arduino和Raspberry Pi的购买和使用都非常便宜。
Raspberry Pi型号范围的底端是Raspberry Pi Pico。这款微型控制器只需 4 美元,是一个业余爱好者项目的可编程神经中枢。与Arduino不同,它支持 C 和MicroPython(用于微控制器的Python),使其成为一个更易于使用的系统。
然而,为了获得完整的性能,Pi 4 Model B的成本在 35 美元(2GB RAM)和 75 美元(8GB)之间,具体取决于零售商。您还可以花10 美元购买更小、功能更弱的零 W。(Zero W)其他板(例如较旧的 Pi、2、3 和 3B)的价格相似,但由于其使用年限和规格较低,可提供折扣。
值得庆幸的是,Arduino板也很划算。有许多可用的Arduino板,但一些最常见的板,如Arduino Uno,售价约为 20-30 美元。其他主板(例如Pro Mini)的价格可能低至 10 美元,Mega的价格为 60 美元,Portena H7的价格为 99.99 美元。
作为开源板,Arduino也有许多类似价格范围的克隆。然而,由于Raspberry Pi Pico的价格仅为 4 美元,Raspberry Pi 的微控制器仍然是最物有所值的,但这将取决于您特定项目的性能和功率要求。
Arduino vs Raspberry Pi:哪个最适合您?(Arduino vs Raspberry Pi: Which Is Best For You?)
说这场战斗有赢家很容易,但实际上没有。Arduino 或Raspberry Pi将成为您正在构建的项目的重要核心。但大多数初学者会发现Raspberry Pi更易于设置和使用。它还为绝对初学者提供了更多的功能、功能和更低的入门门槛。
得益于众多附加组件和适合初学者的操作系统,您可以尝试许多简单的 Raspberry Pi 项目。(easy Raspberry Pi projects)您甚至可以将两者结合起来,使用GPIO接头引脚将 Arduino 连接到(GPIO)Raspberry Pi ,以实现更广泛的项目。但是,如果您刚刚购买了新的Raspberry Pi,您可能需要先对其进行更新(update it first)。
Arduino vs Raspberry Pi: Which is the Better DIY Platform?
If you’re plannіng a new tech projеct and you’re looking for a small, single-board computer that can act as the brain of your design, yoυ’ll probably consider one of two devіces: a Raspberry Pi or an Arduino. Both are aimed for professionals and hobbyists looking to build exciting new projects with a low cost of entry.
Both the Raspberry Pi and the Arduino boards have advantages, disadvantages, and ideal use-cases, depending on your project requirements. If you’re unsure which board is best in the battle between Ardunio vs Raspberry Pi, here’s a run-through to help you decide.
Performance and Specifications
If you’re thinking about a PC replacement board, we’ll answer you now: a Raspberry Pi is the only option (at least compared to an Arduino). With the newest Raspberry Pi 4 and 4B offering between 1GB and 8GB of RAM and a quad-core, 1.5GHz ARM v8 processor, you’ve got a lot of power in a very small board.
Even the smaller Pi models (the Zero and Zero W boards) offer significant power for their size, with a 1GHz ARM CPU, 512MB RAM, GPIO headers for expansions, and integrated WiFi and Bluetooth support.
Like the Pi, there are various Arduino models, with the Arduino Uno offering a very small 2KB SRAM and 16MHz microcontroller for very specific projects. At the other end of the scale is the Arduino Portena H7, with a dual-core Cortex M7+M4 ARM microcontroller, between 8MB and 64MB RAM, and integrated Bluetooth and WiFi.
Is this a fair comparison? Probably not, because the Raspberry Pi and Arduino are two very different products. An Arduino is a customizable, programmable board for custom hardware projects, while the Raspberry Pi is a more “traditional” computer in its own right, with support for various Linux distros and suitable hardware to boot.
Speed and performance are a win for the Pi, but the Arduino doesn’t need to run all the complex applications that a Raspberry Pi (with a full Linux distro) has to. The only fair comparison might be with a Raspberry Pi Pico, the hobbyist microcontroller board with a dual-core ARM Cortex M0+ processor and 264KB RAM.
Functionality
As we’ve touched upon already, the Raspberry Pi is a very powerful computer for its size. While earlier models (from the original Pi to the Raspberry Pi 3) were arguably quite slow, the newest models (the Raspberry Pi 4 and 4B) offer huge performance enhancements.
This makes it possible for you to replace your working PC with a Raspberry Pi. It isn’t ideal for gaming (except for retro gaming) or video encoding, but it’s a fully functional server or PC. It can also be integrated into any number of projects, whether it’s building a weather station or as the nerve center of a robotics build.
The Arduino doesn’t have the same functionality in some ways, but it’s targeting a different audience. If you’re a proficient coder, you can program your Arduino to perform any task you like. It could become a remote controlled car, a home alarm, a communications system—all are possible with the right equipment connected to it.
Expanding the Arduino is the best way to bring out the real power behind it. If you’re happy coding, it’s a great way to build a cheap and simple project. However, the Raspberry Pi offers many of the same advantages, with numerous add-on boards (named HATs) that can be placed on the 40-pin GPIO header on the board itself.
You might choose an Arduino for size or power requirements, but if you need performance and functionality, the Raspberry Pi is the overall winner.
Usability
Although the Arduino and Raspberry Pi are boards with a lot of potential, that doesn’t mean that they’re exceptionally hard to use. Both boards have their origins in education, with the Pi created to help schools and parents reintroduce the 80s-style curiosity that encouraged children to learn to code.
As a microcontroller board, the Arduino is a beginner coder’s dream. The Arduino website itself offers tutorials and example code to help you create new projects. While the Raspberry Pi allows users to do many things at once, the Arduino focuses on a single purpose, created and coded by its user.
Unfortunately, Arduino uses C++ as the main language for its code. This isn’t the easiest language to learn or use, unlike the beginner-friendly Python which the Raspberry Pi supports in full (along with other major programming languages).
If programming isn’t for you, then you don’t need to program with the Raspberry Pi, either. Installing Raspberry Pi OS or another Linux distro will give you a full operating system, including a graphical user interface that allows you to run standard software such as Google Chrome or LibreOffice.
It’s also much easier to control and use a Raspberry Pi, even from a terminal. Linux terminal commands are easy to learn, but if you’d prefer to avoid it, you can—that’s the success of the Raspberry Pi, offering a very low barrier of entry for beginners and amateurs.
The same can’t be said for the Arduino, unfortunately. If you’re prepared to accept the tougher learning curve, however, it can be the centerpiece of a great new project build, but a Raspberry Pi will get you there quicker.
Cost
Power and usability are one thing, but cost is important, especially for a hobbyist project with a modest budget. Thankfully, both the Arduino and Raspberry Pi are extremely cheap to purchase and use.
At the bottom end of the Raspberry Pi model range is the Raspberry Pi Pico. At just $4, this tiny controller is the programmable nerve center of a hobbyist project. Unlike the Arduino, it supports C and MicroPython (Python for microcontrollers), making it an easier-to-use system.
For full performance, however, the Pi 4 Model B costs between $35 (for 2GB RAM) and $75 (for 8GB), depending on the retailer. You can also grab the smaller, less powerful Zero W for $10. Other boards (such as the older Pi, 2, 3, and 3B) are priced similarly, with discounts available due to their age and lower specifications.
Thankfully, Arduino boards are cost-friendly, too. There are many Arduino boards available, but some of the most common, like the Arduino Uno, cost around $20-30. Other boards (such as the Pro Mini) can cost as low as $10, with the Mega costing $60, and the Portena H7 costing $99.99.
As an open-source board, the Arduino also has a number of clones at similar price ranges. With the Raspberry Pi Pico costing just $4, however, the Raspberry Pi’s microcontroller is still the best value for money, but this will depend on the performance and power requirements of your particular project.
Arduino vs Raspberry Pi: Which Is Best For You?
It could be easy to say there’s a winner in this battle, but there isn’t. An Arduino or a Raspberry Pi would make great centerpieces to a project you’re building. But most beginners will find the Raspberry Pi easier to set up and use. It also offers more power, functionality and a much lower barrier of entry for absolute beginners.
Thanks to numerous add-ons and a beginner-friendly OS, there are plenty of easy Raspberry Pi projects you can try. You can even combine the two, connecting an Arduino to a Raspberry Pi using the GPIO header pins for more expansive projects. If you’ve just bought a new Raspberry Pi, however, you may want to update it first.