telecommande-presentation.ino
HID arrow keys drive any slideshow (PowerPoint, Impress, web). A two-button pocket box replaces a €40 clicker.
Hardware required
An Arduino Micro (ATmega32U4, 16 MHz, 5 V) in a breadboard-friendly format with a micro-USB connector and native USB (keyboard/mouse). 2 push buttons + an enclosure.
Wiring
Buttons to GND on 2 and 3; powered by a powerbank through the USB port.
How it works
Each press sends an arrow key; the 250 ms delay debounces and prevents multi-slide jumps. In the Arduino IDE, select « Arduino Micro » and the port, then Upload. On Windows a .inf driver may be needed for the COM port. Since the 32U4 is the USB itself, a bad sketch can lock out reflashing (double reset).
Going further
Add KEY_ESC to start/abort the show, or a third button for presenter mode.
telecommande-presentation.ino
// 2 boutons : fleche droite (suivante) et gauche (precedente).
#include <Keyboard.h>
const int B_SUIV = 2, B_PREC = 3;
bool a1 = HIGH, a2 = HIGH;
void setup() {
pinMode(B_SUIV, INPUT_PULLUP);
pinMode(B_PREC, INPUT_PULLUP);
Keyboard.begin();
}
void loop() {
bool s = digitalRead(B_SUIV);
if (s == LOW && a1 == HIGH) { Keyboard.write(KEY_RIGHT_ARROW); delay(250); }
a1 = s;
bool p = digitalRead(B_PREC);
if (p == LOW && a2 == HIGH) { Keyboard.write(KEY_LEFT_ARROW); delay(250); }
a2 = p;
}