42 of the Most Useful Raspberry Pi Commands. Sometimes it’s difficult to keep track of all the useful Raspberry Pi commands we use often, so I created a list of some of the most common and important ones that will make using Linux on the Raspberry Pi a lot easier.
There are two user “modes” you can work with in Linux. One is a user mode with basic access privileges, and the other is a mode with administrator access privileges (AKA super user, or root). Some tasks cannot be performed with basic privileges and you will need to enter into root mode to perform them. You will frequently see the prefix sudo before commands, which means that you are telling the computer to operate the command with super user privileges.
Another way is to access the root command prompt, which operates all commands with super user privileges. How to Access the Raspberry Pi GUI with a Remote Desktop Connection. In the previous post, we learned how to set up a WiFi dongle and access the Raspbian command prompt via an SSH client called PuTTY.
PuTTY is a great application for accessing the command line in Raspbian from another computer, but you can’t use it to access the Raspbian desktop (GUI). In order to access the Raspbian GUI from another computer, we need to configure it to work with a remote desktop application. This will allow us to access our Raspberry Pi desktop (or the command line) from anywhere in the world as long as we have a computer with an internet connection. To do this, we must first install a service on the Raspberry Pi called xrdp. How to Write and Run a Shell Script on the Raspberry Pi. In this post I’ll discuss the basics of what a shell script is, what they are commonly used for, and finally, how to write and run a shell script on the Raspberry Pi.
What is a shell script? A shell script is simply a text file containing a series of shell (command line) commands that are executed by the BASH shell. The shell reads the script file and executes the commands one by one, as if they were input directly on the command line. How to Write and Run a C Program on the Raspberry Pi. In this brief tutorial, I’ll discuss what a C program is, what C programming is used for, and finally, how to write and run a C program on the Raspberry Pi.
What is a C Program? The C programming language is one of the most widely used programming languages of all time. It is computationally faster and more powerful than Python. How to Write and Run a Python Program on the Raspberry Pi. In this post, I’ll give a quick overview of what a Python program is, what they can be used for, and finally, how to write and run a simple program on the Raspberry Pi.
What is a Python program? The Python programming language actually started as a scripting language for Linux. Python programs are similar to shell scripts in that the files contain a series of commands that the computer executes from top to bottom. How to Make a Custom PCB - Circuit Basics. Breadboards are great for prototyping circuits, but they aren’t very reliable if you plan on actually using it.
At some point, you’re going to build a circuit that you want to make more permanent. The best way to make your project more durable is to get it made into printed circuit board (PCB). In this article, I’ll walk you through the process of designing a PCB and getting it printed by a custom PCB manufacturer. Since good PCB design can mean the difference between a broken circuit and a great one, I’ll give you lots of tips on how to optimize your design. Basics of the I2C Communication Protocol. So far, we’ve talked about the basics of SPI communication and UART communication, so now let’s go into the final protocol of this series, the Inter-Integrated Circuit, or I2C.
You’ll probably find yourself using I2C if you ever build projects that use OLED displays, barometric pressure sensors, or gyroscope/accelerometer modules. Introduction to I2C Communication I2C combines the best features of SPI and UARTs. With I2C, you can connect multiple slaves to a single master (like SPI) and you can have multiple masters controlling single, or multiple slaves.
This is really useful when you want to have more than one microcontrollers logging data to a single memory card or displaying text to a single LCD. Basics of UART Communication. Remember when printers, mice, and modems had thick cables with those huge clunky connectors?
The ones that literally had to be screwed into your computer? Those devices were probably using UARTs to communicate to your computer. While USB has almost completely replaced those old connectors on modern computers, UARTs are definitely not a thing of the past. You’ll find UARTs being used in many DIY electronics projects to connect GPS modules, Bluetooth modules, and RFID card reader modules to your Raspberry Pi, Arduino, or other microcontrollers.
UART stands for Universal Asynchronous Receiver/Transmitter. Basics of the SPI Communication Protocol. When you connect a microcontroller to a sensor, display, or other module, do you ever think about how the two devices talk to each other?
What exactly are they saying? How are they able to understand each other? Communication between electronics is like communication between humans. Both sides need to speak the same language.