Getting Started with Raspberry Pi: A Comprehensive Guide

Getting Started with Raspberry Pi: A Comprehensive Guide
Getting Started with Raspberry Pi: A Comprehensive Guide

What is this? It looks like an Arduino that I have played with before; is it also a microcontroller?

No! This is a Raspberry Pi!

Getting Started with Raspberry Pi: A Comprehensive Guide

The Raspberry Pi is a small computer system developed by the “Raspberry Pi Foundation” and can be considered the smallest desktop computer in the world. Although its size is only that of a credit card, it is equipped with all the basic functions of a computer—just insert an SD card with the operating system installed, along with a mouse, keyboard, and monitor, and it can function like a desktop computer!

Getting Started with Raspberry Pi: A Comprehensive Guide

But wait, with a desktop computer, why produce such a card-sized computer? Is it just another way for capitalists to make money?

This brings us to the mission of the “Raspberry Pi Foundation”: to enhance the education of computer science and related subjects in schools and to make learning about computers fun.

To spark more people’s curiosity about computers, Cambridge University lecturer Eben Upton led his foundation team to develop this compact and affordable (at $35 it is indeed affordable, though considering the exchange rate…) microcomputer.

(Interestingly, it is said that Upton’s motivation for developing the Raspberry Pi was due to the decreasing number of applicants for computer science at Cambridge)

Now I understand, but what can I do with it?

Since the original intention of designing the Raspberry Pi was to make learning (and tinkering) with computers enjoyable, let’s talk about how to use the Raspberry Pi for learning (and creating)!

Raspberry Pi:

Provides an environment for your learning

Getting Started with Raspberry Pi: A Comprehensive Guide

Have you ever tried learning a programming language? It is well known that the first step in learning any language is not printing Hello world, but setting up the environment. So the question arises, how many things in your computer have been set up and never touched again?

Getting Started with Raspberry Pi: A Comprehensive Guide

As a computer dedicated to providing computer education, the official operating system Raspbian OS provided by the Raspberry Pi comes with programming environments like Python and Java, which can be used directly. Avoiding the process of installation and configuration that can drain your enthusiasm. (However, this also brings the possibility of the Raspberry Pi being left unused after purchase)

Getting Started with Raspberry Pi: A Comprehensive Guide

The built-in Python3 environment of the Raspberry Pi

Moreover, to support the educational mission of the Raspberry Pi, the famous mathematical software Mathematica (although for most people, MATLAB seems to be more well-known) also provides a free version installed in Raspbian OS. (Although it runs quite slowly, it is sufficient for learning)

Getting Started with Raspberry Pi: A Comprehensive Guide

Mathematica For RasPi demonstration

(By the way, everyone can enjoy the crazy built-in functions of Mathematica in the image)

If you are not satisfied with this and want to learn other content, no problem. As Raspbian OS is based on Linux, you can easily install software with just a few commands. For example, if you want to set up a deep learning environment, you can do it on the Raspberry Pi with just four or five commands; whereas on your own computer, you might need to search through a whole day of CSDN to navigate through all the pitfalls of environment configuration.

Getting Started with Raspberry Pi: A Comprehensive Guide

(Though it should be said that considering the performance of the Raspberry Pi, if you want to perform deep learning on it, you will likely end up with a warm hand warmer for winter while losing your patience…)

Getting Started with Raspberry Pi: A Comprehensive Guide

What is this, Minecraft for PE?

No, this is Minecraft for Pi! The built-in Minecraft in Raspbian OS, while not very playable, allows you to control it through Python: get player positions, change block types, adjust game parameters… satisfying all your imaginative desires! Additionally, when multiple Raspberry Pis connect to the same local network (like our campus network), they can play games with each other!

Getting Started with Raspberry Pi: A Comprehensive Guide

Connecting to Minecraft with Python3 and printing Hello world in the game

Raspberry Pi:

Forcing you to learn Linux

Getting Started with Raspberry Pi: A Comprehensive Guide

When using Windows, you might find the command line to be a cumbersome tool—copying a file, just open two windows and drag it over, right? Why bother typing their specific locations one by one? But what happens when you discover the power of the command line through the Raspberry Pi? You will find that installing software doesn’t require searching for Download on its official website, downloading and extracting it; you can automatically install software with just a command like sudo apt-get!

However, the only difference between me and a beginner is that I’m not a beginner, so please be gentle with me, experienced Linux users._(:з」∠)_

Getting Started with Raspberry Pi: A Comprehensive Guide

By the way, some friends who are not very familiar with Linux can gradually get to know some jokes through exploration.

You say you are forced to learn Linux, but where is the “forced” aspect?

As we all know, the Zijing Student Apartment cuts off power and lights every night at 11 PM. Forcing power cuts can damage desktop computers, and the Raspberry Pi is no exception. So, feeling sorry for money, you will naturally go learn cron and other Linux built-in task management services to allow your Raspberry Pi to shut down automatically before the power is cut.

Not only Linux, the Raspberry Pi will also force you to actively learn more things Getting Started with Raspberry Pi: A Comprehensive Guide

Most people won’t specifically set up a monitor + mouse + keyboard for the Raspberry Pi, so the most common usage scenario is to connect the Raspberry Pi to your laptop hotspot / dormitory Wifi / campus network, and then use VNC on your computer to remotely log in to the Raspberry Pi to control it.

The first method to connect to the laptop hotspot is the simplest, but if you are not satisfied with keeping your computer hotspot on all the time, you might turn to the latter two methods.

If you choose the second method, you may first encounter the router management page, understand the concept of subnets and realize why you shouldn’t connect to unknown public Wi-Fi.

If there is no Wi-Fi in the dormitory and you choose the third method, you might find yourself in a deadlock: The Raspberry Pi needs to log in to the campus network on the browser – controlling the Raspberry Pi to log in on the browser requires the computer to connect to the Raspberry Pi via VNC – VNC connecting to the Raspberry Pi requires the Raspberry Pi to be connected to the network.

Getting Started with Raspberry Pi: A Comprehensive Guide

If you have a monitor and mouse, you can connect them to the Raspberry Pi to control it directly to log onto the campus network to resolve the deadlock; if not, you can only remove the SD card, insert it into the computer, write commands to connect the Raspberry Pi to the laptop hotspot, and revert to the first method.

(Moreover, since you have no means to control the Raspberry Pi to shut down, this process will inevitably involve a hot swap or forced power cut. Thus, feeling sorry for the Pi, you will be forced to search for “Raspberry Pi hardware switch” and find a way to shut down the Raspberry Pi using the GPIO pins.)

You might want to use Tsinghua-Secure to avoid the login process in the browser. But unfortunately, Tsinghua-Secure operates on the 5GHz band, while the Raspberry Pi can only receive signals on the 2.4GHz band. Moreover, even if your Raspberry Pi does connect to Tsinghua-Secure…

Getting Started with Raspberry Pi: A Comprehensive Guide

Therefore, to ensure that the Raspberry Pi connects well to the campus network, you will be forced to learn how to submit forms to the campus network using Python.

In this process, you will discover that the Raspberry Pi is inherently suitable for running some monitoring scripts. If you take a step further, a new crawling / course grabbing script will be born. (Warning from the Academic Affairs Office.jpg)

Getting Started with Raspberry Pi: A Comprehensive Guide

Raspberry Pi:

Makes your tinkering more intelligent

Getting Started with Raspberry Pi: A Comprehensive Guide

In the last part, it was mentioned that through relentless effort, you learned how to connect the Raspberry Pi to the campus network while mastering Python crawling. However, since your Raspberry Pi is now connected to the campus network, why not install Nginx and turn the Raspberry Pi into your personal website server? Imagine: any device connected to the campus network can open the webpage you host on the Raspberry Pi by entering an address like xxx.xxx.xxx.xxx:xxxx in the browser—isn’t that interesting? (Though it’s a bit frustrating that you can’t get your own domain name and have to use an IP address, but considering the course selection system also accesses via IP, it suddenly feels balanced)

Although the previous discussions focused on software-related content (you might even realize that this is actually a hardware department’s post), the two rows of GPIO pins and camera interface on the Raspberry Pi also provide convenient conditions for it to work in the physical world.

For example, connecting the motors and fans distributed during the hardware competition to the Raspberry Pi can allow it to cool itself. (This example is somewhat cold in various senses…)

Another example is that if you spend an extra fifty yuan to buy a Raspberry Pi camera, place it in your dormitory, you can remotely check your dormitory situation via VNC during boring classes. For example, you might discover that your roommate secretly cross-dressed when you weren’t around (though more likely you will find that everything is as usual in your dorm)

Or, if you don’t use a regular camera but an infrared night vision camera, you can place it on your desk and see which roommate wiped off your project at midnight.

Getting Started with Raspberry Pi: A Comprehensive Guide

In summary, if you enjoy tinkering and learning, the Raspberry Pi will be a great toy tool. With Double Twelve approaching (by the way, how many of you still have money left after Double Eleven?), if there are comrades interested in the Raspberry Pi, consider buying one to learn instead of letting it gather dust!

Getting Started with Raspberry Pi: A Comprehensive Guide

Additionally, if you signed up for electrical design, consider sticking the purchased Raspberry Pi and camera onto your small vehicle; you might even get reimbursementGetting Started with Raspberry Pi: A Comprehensive Guide(but please connect the wires, just sticking a Raspberry Pi and asking for reimbursement is a bit much)

Appendix:

Getting Started with Raspberry Pi

Getting Started with Raspberry Pi: A Comprehensive Guide

Surprised? The title of the entire post is actually in the appendix

If you are interested in what I mentioned above and want to get your own Raspberry Pi, you might need to purchase the following components:

Required component 1: Raspberry Pi motherboard

There are various models of Raspberry Pi, and the latest version is 4B. Compared to the previous generation 3B/3B+,the price of 4B has hardly changed, but its performance has significantly improved, making it the most recommended purchase.

Getting Started with Raspberry Pi: A Comprehensive Guide

In addition to the mainstream models like 4B/3B+/3B, there is also a smaller (coin-sized), cheaper ($5), and less powerful Raspberry Pi Zero. However, I haven’t used it, so interested readers please search for more information on it.

Getting Started with Raspberry Pi: A Comprehensive Guide

Required component 2: SD card

Roughly speaking, the Raspberry Pi motherboard is equivalent to a computer host without a hard drive. Therefore, we need an SD card (to be precise, a microSD card or TF card) as the hard drive of the Raspberry Pi to store its operating system and all files.

Additionally, to write the operating system onto the SD card, you will also need an SD card reader to write the downloaded operating system image onto the SD card.

Required component 3: 5V/3A power supply

You might want to use your phone or computer charging cable to power the Raspberry Pi. However, please note that the Raspberry Pi requires 5V/3A operating voltage and current, so if you plug in a regular power cable, the Raspberry Pi may not function properly.

Recommended component: Insulated case

Since hardware competitions have recently passed, I wonder if anyone has made the mistake of placing a microcontroller on a metal surface and causing a short circuit? The same goes for the Raspberry Pi. Due to many metal contacts exposed, a slight negligence could short-circuit and damage the Raspberry Pi. Moreover, as winter approaches, static electricity becomes more prevalent. If you handle a bare Raspberry Pi and experience a static discharge, it could potentially damage the internal circuits of the Raspberry Pi. (Ouch.jpg)

Other optional components: Monitor & Mouse & Keyboard

These three are used in conjunction to provide a solution when you cannot connect to the Raspberry Pi via VNC. If you have them, great; if not, it’s okay.

After acquiring the necessary devices, you can refer to the relevant tutorials at topurl.cn/3MF for installation and usage, and I won’t elaborate further here.

After all, one of the joys of the Raspberry Pi is tinkering with it, and I won’t take that joy away from you~

Wow, that was long, but I managed to win you over with my charm!

Getting Started with Raspberry Pi: A Comprehensive Guide

Good news, good news! If you share this article with your friends and gather 20 likes, you will not receive any prizes!

However, considering you’ve wasted ten precious minutes reading this meaningless post; why not share it and waste more people’s precious time?

Additionally, the author of this article is just a novice who has owned a Raspberry Pi for less than ten days. Any errors in the content are unintentional, and I hope the experienced users will not hesitate to correct me.

Editor: Yu Zihan

Reviewer: Liu Yang

Getting Started with Raspberry Pi: A Comprehensive Guide

Leave a Comment

×