11 Replies Latest reply on Mar 2, 2015 2:42 AM by IntelAnonymous

    How read/write the edison GPIOs with mraa


      This is what I have:


      I downloaded mraa 0.6.1, compiled it and installed it. According to examples/c++/Blink-IO.cpp i tried to compile my own program to access specific GPIOs via using the C++ interface.


      I have an own hardware with the following inputs and outputs (NO breakout board or sth. similar):


      Output: LED connected to Edison Pin 52 (GP40)

      Input: Button connected to Edison Pin 26 (GP45)

      (actually I have more LEDs and inputs than 1, I simplified here)

      For now let's assume that the hardware is working correctly. My sourcecode: C++ code- 24 lines - codepad



      It seems that I can open the GPIOs since I get no error but the LEDs dont switch. Furthermore I always get constants for my inputs such as


      Current Input:

      Input 1: 0

      Input 2: 1322888

      Input 3: 1737772

      Input 4: 24721777


      Am I using the mraa library correct?