Giter Site home page Giter Site logo

rpi-bash-gpio's Introduction

Raspberry Pi GPIO interface script by Thomas Galea.

Feel free to use this script however you want. Take it, use it, modify it, improve it, learn from it. I simply ask that you keep my name in here if you plan to further share it!

If you find any problems with this script, please let me know! I'll try to solve any issues as soon as possible.

Usage:
gpio [list/export/unexport/edge/inv/dir/set/get] [GPIO#] [value]

list		Lists the currently enabled GPIO pins.
			/exec/gpio list

export		Enables a GPIO pin for use.
			/exec/gpio export 21

unexport	Disables a GPIO pin, preventing use.
			/exec/gpio unexport 21

edge		Sets a GPIO pin's edge. Valid options are 'none', 'rising', 'falling', or 'both'.
			/exec/gpio edge 21 none
			/exec/gpio edge 21 rising
			/exec/gpio edge 21 falling
			/exec/gpio edge 21 both

inv		Sets a GPIO pin's 'active_low' value. If this is 1, the pin's value is essentially inverted.
			/exec/gpio inv 21 0
			/exec/gpio inv 21 1

dir		Sets a GPIO pin's direction as either input or output.
			/exec/gpio dir 21 in
			/exec/gpio dir 21 out

set		Sets the value of a GPIO pin either high (1) or low (0).
			/exec/gpio set 21 0
			/exec/gpio set 21 1

get		Displays the current value of a GPIO pin.
			/exec/gpio get 21

rpi-bash-gpio's People

Contributors

tdgalea avatar

Stargazers

Aaron Russin avatar Alexandre Strzelewicz avatar

Watchers

Athanasios Silis avatar  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.