Raspberry Pi Beginner Guide (wiringPi Tutorial for Linux BASH Shell and C, GPIO LED Blink)

preview_player
Показать описание
*****************************************
Update, March 2024:

WiringPi has been updated to support the latest Raspberry Pi 4/5, but it is not included with default Raspberry Pi OS image. You can use the following commands in your Raspberry Pi Terminal to get WiringPi installed:

cd wiringPiBasics

The above will give you access to the 'gpio' command and you will be able to compile C programs that use wiringPi library, for example:

gcc -Wall blink.c -lwiringPi -o blink
*****************************************

This tutorial shows how to get started with Raspberry Pi GPIO using the wiringPi library. You will be shown the full process starting with a simple circuit build, Linux shell commands needed all the way to a fully-functional C program which will blink LEDs. I spend considerable time explaining how to safely deactivate GPIO ports after use to avoid damaging them.

If you are just starting out with the Raspberry Pi this is the tutorial for you, even if you have not programmed in C before. However, making more advanced projects requires a deeper knowledge of C. In most cases I recommend Python, which is a lot more friendly to beginners. The gpio shell command always comes in handy.

0:00 Intro
0:45 The Circuit
2:15 Working with BASH Shell
4:22 Basic C Program
5:22 C Program Compilation Using gcc
7:08 C Program Improved
9:11 Running the Program in the Background
9:56 Using BCM Numbering in C
10:30 Wrap Up with Full Code

Disclaimer:
"Raspberry Pi" and the distinct logo are a trademark of the Raspberry Pi Foundation.

Music: Flames by Dan Henig, YouTube Music Library
Рекомендации по теме
Комментарии
Автор

So much substance in such a short video!!

fondueeundof
Автор

Compilation command shown in the video may not work on latest Raspberry Pi OS. Use the following command instead:

gcc -Wall blink.c -lwiringPi

OR

gcc -Wall blink.c -lwiringPi -o blink

m.heidenreich
Автор

WiringPi V3.0.1 has just been released with support foir the RPi 5

davidleckie
Автор

Thanks. What's the process to download wiringPi on a PC then copy it to the Pi's microSD card to install it, instead of having the Pi online?

TooSlowTube
Автор

sadly wiringPi no longer exists. the site is dead

k_