bouton.ino
The GIGA's 76 I/O pins work exactly like an Uno's: INPUT_PULLUP, digitalRead, debounce. The Arduino mental model holds; only the voltage (3.3 V) changes 5 V circuits.
Hardware required
An Arduino GIGA R1 WiFi (STM32H747, 1DX radio module: Wi-Fi b/g/n + BLE, u.FL antenna included), powered over USB-C. 1 push button (D2 to GND).
Wiring
Button between D2 and GND, internal pull-up. All pins are 3.3 V max — check 5 V modules before plugging.
How it works
The sampling + stability-window pattern is platform-independent; the GIGA runs it at 480 MHz effortlessly. In the Arduino IDE, « Arduino Zephyr-based Boards » platform, « Arduino Giga R1 » board; fit the u.FL antenna before using the radio, then Upload.
Going further
An 8-button bus on one port (fast GPIO read), or an on-screen menu via the OLED sketch's I2C.
bouton.ino
// Bouton sur D2 (vers GND) + temoin LED 13, anti-rebond.
const int BOUTON = D2;
const unsigned long ANTI_REBOND = 30;
bool dernier = HIGH, stable = HIGH;
unsigned long bord = 0;
void setup() {
pinMode(BOUTON, INPUT_PULLUP);
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(115200);
}
void loop() {
bool lu = digitalRead(BOUTON);
unsigned long t = millis();
if (lu != dernier) bord = t;
if (t - bord >= ANTI_REBOND && lu != stable) {
stable = lu;
digitalWrite(LED_BUILTIN, !stable);
Serial.println(stable == LOW ? "APPUIE" : "relache");
}
dernier = lu;
}