Slackware - ARMThis forum is for the discussion of Slackware ARM.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a RPi 3 with slackware 14.2 installed. I would like to use the gpio in a general way. I have a pi zero with raspbian installed and use sysfs to control the pins. I'm not using i2c or pwm or anything like that, i want to read the value of a pin (high or low) in a bash script like i do on the pi zero. I want to avoid using python, and avoid using raspbian. thanks
There must be scores or hundreds of ways of doing this. The RazPi is about the most numerous and well-eperimented-with sbc out there. I'm not sure what you mean 'I don't want to use raspbian.' The Pi need an OS, clearly.
That said, Raspbian will probably have some way of doing GPIO. General Purpose Input Output (GPIO) is handy on Micro-controllers (e.g. Micrpchip's Pics) but messy on computers. The pins have to be controlled individually. They are a few pins stuck on with an awkward interface, and I very much doubt if a script will talk to them. If I needed GPIO, I would be very glad of any help in raspbian.
I think my question wasn't clear enough. Is it possible to control gpio pins using the sys calls as outlined in the link above in SLACKWARE? WiringPi installs nicely, but its a library to compile against C-code not to be used in a bash script.
Check my link above. Its examples are given directly in Bash. And I have used code very similar, to turn an LED on and off, interactively, using Bash.
Addendum: in the article, the commands are presented as if for a non-root user. On my RPi, the directories and files require root privileges, so you have to log in as root (or "su -" from a non-root command line) to try them out.
Last edited by gus3; 04-19-2020 at 09:16 PM.
Reason: Addendum.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.