树莓派 学习编程_为什么要学习在树莓派上编程

树莓派 学习编程

In this article “Java vs Python — Which Programming Language Should Programmer Learn First?” by Javin Paul, you can find a comparison between the two most popular programming languages. Of course, as being a Java-developer myself, it’s not a mystery which I would prefer ;-)

在本文“ Java与Python –程序员应该首先学习哪种编程语言?”中Javin Paul撰写 ,您可以找到两种最受欢迎​​的编程语言之间的比较。 当然,作为我自己的Java开发人员,这并不是我更喜欢的神秘事物;-)

But more important than the language, could be the computer you are using! Let me tell you why I think the Raspberry Pi is the perfect getting-started computer…

但是比语言更重要的是您正在使用的计算机! 让我告诉你为什么我认为Raspberry Pi是完美的入门计算机…

The goal of the Raspberry Pi project was to build an inexpensive PC that is affordable for all. You can connect it to your TV if you don’t have a computer-screen and different versions are available, depending on your budget.

Raspberry Pi项目的目标是制造一款价格便宜且所有人都能负担得起的PC 。 如果您没有计算机屏幕,并且可以使用不同的版本,则可以将其连接到电视,具体取决于您的预算。

If you want to have a quick start, buy the “Raspberry Pi 4 Desktop Kit” (130€) which includes the board, power supply, HDMI cables, case, and microSD card with the operating system pre-installed. You only need to add a monitor or TV.

如果您想快速入门,请购买“ Raspberry Pi 4桌面套件”(130欧元) ,其中包括主板,电源,HDMI电缆,机箱和预装有操作系统的microSD卡。 您只需要添加监视器或电视。

为什么要使用Raspberry Pi? (Why use a Raspberry Pi?)

价格 (The price)

If you already have a power supply, cables, and/or microSD card, you can buy the board itself starting from 40€. Yep, indeed, that’s the starting price for a complete PC on a small board!

如果您已经有电源,电缆和/或microSD卡,则可以从40欧元起购买该板本身。 是的,的确,这就是一整块PC在小板上的起价!

Raspbian OS(完整) (Raspbian OS (full))

There are different operating systems available for the Raspberry Pi, but the perfect starting point is provided by “Raspbian OS (full)” which can be copied to a microSD card with the free “Imager” tool.

Raspberry Pi可以使用不同的操作系统,但是“ Raspbian OS(完整)”提供了完美的起点,可以使用免费的“ Imager”工具将其复制到microSD卡上。

Image for post

When you use this OS you’re ready to start working from minute one as these tools are pre-installed:

使用此操作系统时,您已经准备好从第一分钟开始工作,因为这些工具已预先安装:

Image for post

I only added “Visual Studio Code” to this list myself. This program is not available through the official website in a version for Raspbian OS, but follow these steps to install it through the terminal:

我本人仅将“ Visual Studio代码”添加到此列表中。 该程序无法通过Raspbian OS版本的官方网站获得,但是请按照以下步骤通过终端进行安装:

$ cd /home/pi/ 
$ wget https://github.com/stevedesmond-ca/vscode-arm/releases/download/1.28.2/ vscode-1.28.2.deb
$ sudo apt install ./vscode-1.28.2.deb

多种编程语言 (Multiple programming languages)

Make your choice: Java, Python, JavaScript,… or start with the basics with Scratch. You can all run and use it on the Raspberry Pi.

做出选择: JavaPythonJavaScript …或从Scratch开始。 您都可以在Raspberry Pi上运行和使用它。

And as you can see in the above screenshot, multiple tools are available for all these programming languages.

如您在上面的屏幕截图中所见,所有这些编程语言都提供了多种工具。

GPIO (The GPIOs)

When you look at the Raspberry Pi board, you’ll find 40 pins (2 rows of 20). Those are the GPIOs (= General-purpose input/output). Some of those can be used as a digital input or output pin, meaning 0 Volt is off, 3.3 Volt is on. And the number of things you can do with it is amazing!

当您查看Raspberry Pi板时,会发现40个引脚(2行,共20行)。 这些是GPIO(=通用输入/输出)。 其中一些可用作数字输入或输出引脚,这意味着0伏关闭,3.3伏开启。 您可以做的事情数量惊人!

These GPIOs pins are even one of the main factors which made the Raspberry Pi such a success! As I discussed in a podcast with Adam Bien (airhacks.fm), you can indeed find a cheap second-hand laptop which includes a battery, screen, etc. but you’ll never be able to build experiments which combine soft- and hardware in such an easy way as you can do with the Raspberry Pi.

这些GPIO引脚甚至是使Raspberry Pi如此成功的主要因素之一! 正如我在与亚当·比恩(Adam Bien)(airhacks.fm)进行的播客中所讨论的那样,您确实可以找到便宜的二手笔记本电脑,其中包括电池,屏幕等,但是您永远无法建立将软硬件结合在一起的实验就像使用Raspberry Pi一样简单

In this long article on Oracle Java Magazine you can find a detailed step-by-step for a Java application with a user interface to control a LED and show the measurements of a distance sensor on a graph.

在《 Oracle Java Magazine 》上的这篇长文章中,您可以找到有关Java应用程序的详细分步指南,该Java应用程序具有用于控制LED并在图形上显示距离传感器的测量值的用户界面。

动力 (The power)

The latest Raspberry Pi 4 is fast and available with 2, 4, or 8GB of memory. I wrote a full book on it and created a lot of different Java applications on it. You can connect up to two 4K monitors, so a lot of space to have different applications, terminal, file explorer, etc. Already one such a 4K screen is a programmer’s heaven!

最新的Raspberry Pi 4速度很快,并具有2、4或8GB的内存。 我为此写了一本完整的书,并在其中创建了许多不同的Java应用程序。 您最多可以连接两个4K显示器,因此有很多空间可以容纳不同的应用程序,终端,文件浏览器等。已经有一个这样的4K屏幕已经成为程序员的天堂!

Image for post

书籍“ Raspberry Pi上的Java入门” (Book “Getting Started with Java on the Raspberry Pi”)

If you want to start experimenting with Java on the Raspberry Pi, I can highly recommend my book which guides you through all the steps to get started with a lot of examples.

如果您想开始在Raspberry Pi上使用Java进行实验,我强烈推荐我的书,它指导您完成所有步骤,并从许多示例开始

It’s available as an ebook on Leanpub and a paper book on Elektor. If you want to dive into the sources of the examples, take a look at this GitHub repository.

它可以在Leanpub上获得电子书,在Elektor上获得纸质书 。 如果您想深入了解示例的源代码,请查看此GitHub存储库

If you prefer courses, there is also a course on Udemy — Use Java and Java FX on a Raspberry PI to learn more bout using Raspberry PI in Java.

如果您喜欢这些课程,那么还有一本关于Udemy的课程— 在Raspberry PI上使用Java和Java FX可以在Java中使用Raspberry PI来学习更多内容。

Image for post

Originally published at https://webtechie.be.

最初发布在 https://webtechie.be

翻译自: https://medium.com/javarevisited/why-you-should-learn-to-program-on-the-raspberry-pi-da4a039bb02b

树莓派 学习编程

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值