🛠 Apprivoiser les connecteurs 80 broches : bouton, LED et entrée analogique
Objectives
The Portenta H7 has neither a classic Arduino connector nor standard breadboard-friendly headers: its pinout is exposed through two stacked 80-pin high-density connectors (the "Arduino industrial" standard) under the board, plus an MKR-style connector footprint. These pairs expose UART, SPI, I²C… and also the embedded 10/100 Ethernet PHY. This tutorial teaches you how to read a button and a potentiometer, and how to understand the carrier ecosystem (Breakout, Max Carrier, Mid Carrier, Hat Carrier, Machine Control) that makes the pinout usable in the workshop.
Hardware
- 1 × Arduino Portenta H7 (or the Portenta Breakout carrier to easily connect wires)
- 1 × push button (digital pin → GND, internal pull-up)
- 1 × 10 kΩ potentiometer (ends connected to 3.3 V and GND, wiper connected to an analog pin)
- Dupont cables, breadboard if you are using the Breakout
- Serial console at 115200 baud
Full code
// bouton_potentiometre.ino — GPIO + ADC sur Portenta H7
// >
// ADC et de sorties PWM routees sur les connecteurs 80 broches — la page
// pinout officielle (JS) n'a pas pu etre verifiee ; consulte la section
// pinout de docs.arduino.cc/hardware/portenta-h7 avant de cabler.
const int BROCHE_BTN = D7; // bouton -> GND, actif a 0
const int BROCHE_ADC = A0; // curseur du potentiometre
void setup {
Serial.begin(115200);
while (!Serial) {}
pinMode(BROCHE_BTN, INPUT_PULLUP); // pull-up interne, pas de R externe
pinMode(LEDG, OUTPUT);
}
void loop {
int brut = analogRead(BROCHE_ADC); // ADC 12 bits (STM32H747 : 3 ADC)
bool appuye = (digitalRead(BROCHE_BTN) == LOW);
digitalWrite(LEDG, appuye ? HIGH : LOW);
Serial.print("adc="); Serial.print(brut);
Serial.println(appuye ? " bouton=APPUIE" : " bouton=repos");
delay(100);
}
Expected verification
Turning the potentiometer scrolls the ADC value (the STM32H747 features 3 ADC converters, 2 DACs, and 2 ultra-low-power comparators), and the green LED follows the button press. A key point of the ecosystem: the 80-pin connectors are a mezzanine pin-compatible standard — you can replace an H7 with an H7 Lite or an X8 on the same carrier, and the 10/100 Ethernet PHY also passes through these connectors.
Common errors
- Trying to plug Dupont cables directly under the board: the 80 pins are mezzanine connectors, not 2.54 mm headers — use the Portenta Breakout or a carrier (Max/Mid Carrier) for prototyping.
- Relying on a pinout diagram inherited from docs.portenta.io: the old site is dead (DNS) and the PortentaDocs repository returns a 404; only the hardware page on docs.arduino.cc is authoritative for the pinout.
- Confusing the two rows of the connectors: each 80-pin connector carries multiple functions per pin depending on the configuration — check the official pinout table pin by pin.
- Powering a pin beyond the board's voltage: >
- Button without a pull-up and a floating pin: use
INPUT_PULLUP, otherwise the read state is random. - >
Other tutorials for this board
- Premier programme : installer le core et faire clignoter la LED (M7 à 480 MHz !)
- Se connecter au Wi-Fi avec le module Murata 1DX (station WPA2)
- Dual-core M7 ↔ M4 : appels de fonctions distants avec la bibliothèque RPC
- Client HTTPS/TLS : interroger une API sécurisée via le Murata 1DX
- Serveur web sur le port Ethernet 10/100 embarqué
- MicroPython + machine vision : le firmware OpenMV sur un cœur, C++ sur l'autre
Code examples for this board
clignotante.inoArduinobouton-poussoir.inoArduinopwm-respiration.inoArduinoentree-analogique.inoArduinomulti-uart.inoArduinocapteur-i2c-bmp280.inoArduino