2 Replies Latest reply on May 14, 2015 12:23 PM by Eliot

    Using GP111 as input?

    Eliot

      I'm trying to use GP111 as an input with the mini breakout board and Edison

       

      I've attached my python test code using mraa pin 9 which should match up to GP111 http://iotdk.intel.com/docs/mraa/v0.6.0/edison.html

       

      Running the code gives me "ValueError: Invalid GPIO pin specified"


      If I echo -n "111" > /sys/class/gpio/export I get sh: write error: Device or resource busy


      I've successfully used this code with mraa pin 7, GP20


      For my full project, I plan on using this i2c port


      I2C-6-SCL

      I2C-6-SDA


      With momentary switches connecting GND and


      GP20

      GP111


      And finally a digital output that I can switch between high and low on


      GP165


      These were chosen for routing convenience. Is there something fundamental I'm missing in using these GPIOs?



        • 1. Re: Using GP111 as input?
          Yodal

          GP111 is basically unusable right now, as is SPI CS 1, because of the built in support for the ADC over SPI for the Arduino board. Sadly, the driver that runs the ADC does not get out of the way when the ADC is not being used or detected blocking everyone from using those pin/interfaces for something else. To top it off, everything is baked into the kernel making fixing this problem difficult at best. In short, I hope the routing is not difficult to change.

           

          Little side note, do some research on I2C 6, I may be remembering wrong, but I may have seen somewhere that it doesn't exactly work and that I2C 1 should be used. Again, not completely sure, just trying to save you from more headaches caused by the half-baked-ness that is the Edison.

          • 2. Re: Using GP111 as input?
            Eliot

            Thanks for the solid insight.

             

            With guidance, I've been using I2C6 successfully.

             

            One of the I2C issues is: I2C1 is the mux system for the Arduino board and I2C6 is the one available in the header. But... if you buy something like Sparkfun's 9DOF board, they wired it to I2C1 which means you can't program it using the Arduino IDE. You have to edit the board header file to use it.