About the GPIO_46, are you trying to access in to the Analog Input 2 (A2)? According to the Linux Pin Distribution?
Mini breakout? Arduino pin does not go up that high.
when you specify 46 hot mraa this corresponds to connector pin j20-5 edison gp47. Is this what you want? Or did you want edison pin Gp46? If so it is on mini board mraa pin 32. would need to look up pin on arduino...
I want the Edison module pin GP46 not as a A/D just as a basic IO. I'm currently using the Adruino board, which has the GP46 exposed via a test pad, but this module will not be on the Adruino board in the end, so I just want the mraa library to access the GP46 (pin 28 on the 70-pin header) and other GP pins. When I call the function mraa_gpio_init() you are suppose to pass in the GP # you want to init correct?
no you pass in mraa PIN number, which on arduino breakout is I believe only in the range 0-19.
If you really want that's what mraa_gpio_init_raw() is for. But you probably just want to ask for Gpio(16) which will give A2 as a gpio.
Ok, so if I want to open up the actual pin on the Edison Module, ie GP46, I would call mraa_gpio_init_raw(46). Otherwise I would map what pin Adruino has it set, and in this case GP46 isn't mapped so I would have to use the raw function.
Yes and No.
That is if you look at the current documentation for the Arduino breakout board: https://communities.intel.com/servlet/JiveServlet/downloadBody/23161-102-8-27954/edison-arduino_HG_331191-005.pdf
You will see: for example in Table 3, that GP46 is on IO pin 16 (A2), so you could simply pass in 16 to the mraa_gpio_init.
arfoll can answer some of this better than I can, but without me actually trying it I am now sure how well opening up the RAW version would work on actual IO pins that are used as full logical pins.
That is, for example the mraa_gpio_init_raw(46) would not call the gpio_init_post function for the logical pin. It also may not do all of the work, like clear the tristate object, set the mux values, and then reset the tristate object... Again not sure without actually trying it out.
I called the function mraa_gpio_init() and this time I used the value 16 and it still came back with a 0. But when I call the function mraa_gpio_init_raw(46) and then check the GPIO 46 test point (tp26) it worked.