Skip to content

This 2-part Raspberry Pi GPIO tutorial shows how to correctly use buttons with wiringPi. While I use the buttons to control LEDs, you can use the same approach with any other electronic components (or code in a subroutine/function in general).

License

Notifications You must be signed in to change notification settings

mheidenreich/buttons.c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

buttons.c

This 2-part Raspberry Pi GPIO tutorial shows how to correctly use buttons with wiringPi. While I use the buttons to control LEDs, you can use the same approach with any other electronic components (or code in a subroutine/function in general).

Companion YouTube video: https://www.youtube.com/watch?v=9Znf0CnsbXI

gpio command not working or buttons.c does not compile on your system?

Original wiringPi library is deprecated by the original developer and it does not work with latest versions of Raspberry Pi. If you have Raspberry Pi 4 or 400 you will receive an “unknown board” error when attempting to use the gpio command. Also, latest version of Raspberry Pi OS may not even have the gpio command installed, which results in a “command not found error”.

You can download and build a wiringPi fork to have wiringPi on your latest Pi: https://github.com/WiringPi/WiringPi/ Simply follow the INSTALL file instructions.

About

This 2-part Raspberry Pi GPIO tutorial shows how to correctly use buttons with wiringPi. While I use the buttons to control LEDs, you can use the same approach with any other electronic components (or code in a subroutine/function in general).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages