gpio How can I use it?

ohseohwanohseohwan Posts: 3New Member
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?


  • DCleriDCleri Posts: 520Administrator, Emutex admin
    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?
  • ohseohwanohseohwan Posts: 3New Member
    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?
  • Nicola LunghiNicola Lunghi Posts: 4New Member
    Please verify that the kernel you're running is our kernel
    Follow the instruction here
  • DCleriDCleri Posts: 520Administrator, Emutex admin
    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
  • JohannesJohannes Posts: 3New Member

    I have the same problem with my board. I have Lubuntu 16.04.02 fresh installed this morning . I also followed this instruction ( 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 ( 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.

  • Dan O'DonovanDan O'Donovan Posts: 218Emutex mod
    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:
  • JohannesJohannes Posts: 3New Member
    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.
  • ohseohwanohseohwan Posts: 3New Member
    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.
Sign In or Register to comment.