gpio How can I use it?
ohseohwan
New Member Posts: 3 ✭
I am testing in lubuntu, but gpio does not work.
#echo 26 > /sys/class/gpio/export
bash: echo: write error: Invalid argument
How do I use gpio?
#echo 26 > /sys/class/gpio/export
bash: echo: write error: Invalid argument
How do I use gpio?
Comments
-
Which board are you using? UP Board or UP Squared?
Which version of lubuntu have you installed?
If you have an UP Board, have you also added our kernel from this tutorial?
https://up-community.org/wiki/Ubuntu -
I use the up board 2GB+32GB eMMC memory
Installed OS : lubuntu-16.04-alternate-amd64.iso
I updated it according to the following contents.
Ubuntu 16.04.1 LTS (Xenial Xerus)
Install the latest Xenial desktop-amd64 release
From a terminal, add the UP board PPA:
sudo add-apt-repository ppa:ubilinux/up
Update the package database:
sudo apt update
Install the upboard kernel:
sudo apt install linux-upboard
The same thing is happening.
Can I use gpio in lubuntu? -
Please verify that the kernel you're running is our kernel
Follow the instruction here
https://up-community.org/wiki/Ubuntu#Testing -
please verify the kernel you are running is the ubilinux kernel for Ubuntu, what is the results of this command?
$ uname -r
Also, you should be root when trying to use GPIO on ubuntu/lubuntu unless you set some additional rules/permissions -
Hello,
I have the same problem with my board. I have Lubuntu 16.04.02 fresh installed this morning . I also followed this instruction (https://up-community.org/wiki/Ubuntu) and uname -r returns 4.4.0-2-upboard. I installed the rpi.gpio via pip because I can't find it in de apt-get repository as it is shown in this thread (https://up-community.org/wiki/RPi.GPIO). Do you have any ideas what went wrong? I also tried to use ubilinux but there occured some errors at the installation but this is an other topic ;-) . Thank you for your help.
Johannes -
The version of rpi.gpio installed with pip will not work on the UP board. You need to use the version that we include with ubilinux instead. Please see this thread for more information:
https://up-community.org/forum/general-discussion-up/1099-modified-python-rpi-gpio-library#3221 -
Thank you for your help. I finally managed it to install Ubilinux after I used Rufus to create the bootable USB Stick, which works fine. I will test it when I reinstall Lubuntu.
-
When I installed ubuntu 16.04 and tested it, it worked normally but it did not work on lubuntu. First of all, we will continue testing on ubuntu16.04.
Thank you.