how to understand the 40HAT pin mapping configuration

alexis_nicolas New Member Posts: 8

It's so confusing,

I was trying to set a gpio pin to output high through c++ code using the mraa library. and I had so much trouble finding the right pin number to use to set the good pin.
the pin number has 2 gpio number asssociated.

in my BIOS, the pin is GPIO15 (pin 37) and setting it to output high really worked. but with the mraa library I had to do

mraa::Gpio gpio_1(26, true, true);

for make it working.

maybe the third argument to gpio at true makes the numbering different, but puting false did that no pins where accepted so I had no choice.

In the document of my up4000:

the pin is numbered like in the BIOS, while the wiki schema:

uses the gpio26 number instead, the only constant being the pin number 37.

so I want to set the GPIO19 (pin 16) in my BIOS to output because my SPI_CLK isn't working if I don't do that. will this work if I use mraa with gpio23 instead because the wiki says so.

why is this so confusing. This other wiki page: even has different numbering