I do not have programming skills, but I have some knowledge using the command line of the shell. Is it possible to get access to the GPIO just from the shell ?

  • 1
    Yes it is possible. See elinux.org/… But then again if you can handle shell script you could also easily learn other languages, e.g. python. – Ghanima Feb 12 '15 at 21:30
  • @Ghanima Why not make that an answer? – joan Feb 12 '15 at 21:40
  • Link-only answers are, well you know ;) Beside that I was sure that I read about that topic before on RPi.SE but did not find that reference for calling a dupe. – Ghanima Feb 12 '15 at 21:44
  • @joan, ok you made me do it. It's a stub for now but if it is not challenged as a dupe it could be expanded. – Ghanima Feb 12 '15 at 22:00

ELinux lists two options to directly access GPIO pins from the command line interface and other libraries exist:

  1. sysfs, the virtual filesystem allows root to directly read from and write to GPIO pins by echo to or cat from various files in the /sys/class/gpio/ folder.

  2. wiringPi library provides a cli command gpio to be used by non-privileged users for direct access.

  3. pigs utility, part of the pigpio library also offers comprehensive control of the GPIO pins from the command line (see pigpio for download of source, installation procedures and excellent application examples).

  • 5
    The pigpio pigs utility allows comprehensive control of the gpios from the command line. – joan Feb 12 '15 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.