Code Monkey home page Code Monkey logo

buttons.c's Introduction

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.

buttons.c's People

Contributors

mheidenreich avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.