output problems

Discussion in 'UDOO NEO' started by Trevor Woudstra, Jan 29, 2021.

  1. Trevor Woudstra

    Trevor Woudstra New Member

    Joined:
    Jan 29, 2021
    Messages:
    1
    Likes Received:
    0
    Hi everyone,

    I'm new to Udoo and new to programming so please treat me as if I know nothing because that is where I'm at.

    I have a Udoo extended and have it booted up. I've been able to change the direction on GPIO_102 and GPIO_22 to OUT, but, on both pins when I echo 1 for value it doesn't change. What am I missing?

    root@udooneo:/home/udooer# echo 102 > /sys/class/gpio/export
    root@udooneo:/home/udooer# echo out > /sys/class/gpio/gpio102/direction
    root@udooneo:/home/udooer# cat /sys/class/gpio/gpio102/direction
    out
    root@udooneo:/home/udooer# echo 1 > /sys/class/gpio/gpio102/value
    root@udooneo:/home/udooer# cat /sys/class/gpio/gpio102/value
    0

    This is what I typed.

    I'm working on a rather large project so I'll definitely be coming back for more help.

    Thanks
     
  2. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,306
    Likes Received:
    578
    Why dont you use the simpler GPIO way of working https://www.udoo.org/docs-neo/Hardware_&_Accessories/GPIO.html
    Export is already done by the udoo-gpio-export package so no need to do that again.

    Write values
    To write a low or high value on a GPIO, you need to write 0 or 1 in the value file:

    # set GPIO 25 to low value - 0 volts
    echo 0 > /gpio/pin25/value

    # set GPIO 25 to high value - 3.3 volts
    echo 1 > /gpio/pin25/value
     
    evaloverde likes this.

Share This Page