I’m working with a SparkFun MicroMod ATP board which uses pins labeled G0 to G11. My goal is to control these pins using the STM32F405 microcontroller inside, but I’m having trouble finding the correct pin mapping between the SparkFun pin labels (G0–G11) and the STM32F405 pin names like PC0, PC2, etc.
I’ve tried multiple approaches to define pins in my Arduino/PlatformIO project, for example:
const int Testpin = 71; // Trying a numeric pin index
const int Testpin = PC_2; // Trying STM32 pin name directly
I suspect that my environment or variant files might be incorrect or outdated, and that’s why I can’t find the correct translation from SparkFun’s Gx pins to the underlying STM32 pins.
Could someone please point me to the official or correct variant/pin mapping files, or explain how to properly map SparkFun MicroMod ATP pins (G0–G11) to STM32F405 pin names in the Arduino framework?
const int Testpin = 71; // numeric pin index
const int Testpin = PC_2; // using STM32 pin name
The numeric indices (like 71) depend on how the variant defines them. It’s unlikely that 71 corresponds to G-pin or physical pin you expect. Unless you know the correct Arduino “pin number” as defined in variant_MICROMOD_F405.h, using a raw number often fails.