Problem Handling GPIOs

Discussion in 'Troubleshooting' started by Islam Alaa, Jul 18, 2015.

  1. Islam Alaa

    Islam Alaa New Member

    Joined:
    Jul 18, 2015
    Messages:
    2
    Likes Received:
    0
    Dear All;

    I do have a problem while dealing with GPIOs , I have set one of the GPIO pins mode to input , GPIO 141 specifically.

    My application is written in C++ and run on the ubuntu version provided with the UDOO quad board.

    the problem is , at the beginning of the code running , I can read the value of that pin correctly , after a while of the code running , the value of the pin is not changed

    the input wire is 3.3v , but the value file of the GPIO 141 is not changed and is set to 0 ..

    Where would be the problem ... also if there is a full c++ example of how to deal with GPIO effectively and handle the connectivity with the Arduino side too .. that would be great.

    thanks ..
     
  2. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    Hi there,
    what is connected to GPIO 141 ? Who or what drive this pin? If it's an external device, are grounds connected?
     
  3. Islam Alaa

    Islam Alaa New Member

    Joined:
    Jul 18, 2015
    Messages:
    2
    Likes Received:
    0
    hello

    the pin is drived from external source and yes they have a common ground.
     
  4. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    Could you try to use it with another GPIO to check if you get a different behaviour?
     
  5. fetcher

    fetcher Member

    Joined:
    Mar 9, 2014
    Messages:
    166
    Likes Received:
    20
    Just one possibility, but if you're not currently using the Arduino-side SAM3X CPU for anything, try forcing it into RESET state, to ensure a sketch loaded there isn't interfering with this shared GPIO pin. If you don't want to fiddle with the jumper, "echo 0 >/sys/class/gpio/gpio0/value" will hold the SAM3X in RESET.
     

Share This Page