• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
KaliTut

KaliTut

Kali Linux tutorial and Linux system tips

  • Home
  • Raspberry Pi
  • Privacy Policy
  • About us

Control and program Raspberry Pi GPIO

Last Updated on July 19, 2020 by Kalitut Leave a Comment

Raspberry Pi control and program GPIO

Raspberry Pi  GPIO

There are many different ways to control and program the GPIOs. Which one is used depends on the requirements one has. Or simply of your own abilities to become familiar with certain programming languages and libraries. Previous knowledge makes getting started easier. But maybe that’s not the way to do what you’re supposed to do with the GPIOs. Therefore, here is a small selection of the possibilities to control and program GPIOs.

  • Shell/bash: sysfs
  • Shell/Bash: wiringPi
  • Shell/Bash: pigpio

Shell / bash: sysfs
On the command line (shell) “sysfs” is available. It belongs to the Raspbian Linux distribution. In principle, it is a directory tree that can be used to address the GPIOs.
Using sysfs is the most obvious way to control the GPIOs. But, it is hardly intuitive to use. Usually you will try to build simplifications yourself or try other solutions.

  • Control and program GPIO with “sysfs” (shell/bash)

Shell / Bash: wiringPi
A simplification on the command line is “wiringPi”. Using simple commands, the GPIOs can be controlled and programmed. But, “wiringPi” is a bit older and no longer the preferred way to address GPIOs.

  • Control and program GPIO with “wiringPi” (shell/bash)

Shell / Bash: pigpio
A simplification on the command line is “pigpio”. It’s also the preferred way to easily control and program GPIOs on the command line.

  • Control and program GPIO with “pigpio” (shell/bash)

GPIO assignment
No matter how you program the GPIOs, there is always the same problem. Which numbering system is used to control the individual GPIOs? Is the GPIO number (BCM) used? Or is the pin number used? Both are not identical and are often confused by beginners. Which numbering system one uses does not really matter. The easy way goes over the pin number, because then you just have to count in case of doubt. This also simplifies the wiring. However, the GPIO number (BCM) tends to be recommended because it determines which GPIO is meant.

  • Raspberry Pi GPIO assignment

Filed Under: Raspberry Pi

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Follow us

  • Facebook
  • Twitter
  • YouTube

Categories

  • Android pentesting tools
  • Arduino
  • Books
  • Darknet
  • database
  • General
  • Github Tools
  • Hacking
  • Kali Linux
  • Linux
  • Linux Commands
  • Network Administrator
  • Penetration Testing
  • Penetration Testing Tools
  • PowerShell
  • Raspberry Pi
  • resources
  • Review
  • Termux
  • Tutorials
  • Ubuntu
  • Uncategorized
  • Video Tutorials
  • vmware
  • WiFi Adapter
  • WiFi Pentesting
  • Wireless Router
  • Wireshark

Recent Posts

  • Hijacked Wi-Fi? Thorough explanation of hacking techniques
  • Windows PowerShell tutorial for beginners
  • Learn to Hack Steps from Beginner to Hacker
  • PowerShell Tutorial – GUIDE introduction with basics
  • Top Hacking Tools
  • Home
  • About us
  • Privacy Policy
  • Affiliate disclaimer

Copyright © 2023