🛠 Clignotement de la LED builtin (broche 13)
Objectives
The built-in LED of the Arduino Pro Mini (pin 13, LED_BUILTIN constant in the core) is soldered onto the board: no external wiring is required. This first tutorial verifies that the board is alive, that the ATmegaBOOT serial bootloader accepts an upload via the 6-pin connector — the Pro Mini has NO USB chip — and familiarizes you with the critical board selection: choose "Arduino Pro or Pro Mini" and then the CPU corresponding to YOUR model (5 V/16 MHz or 3.3 V/8 MHz).
Hardware
- 1 × Arduino Pro Mini (ATmega328P @ 5 V/16 MHz or 3.3 V/8 MHz — check the markings on the regulator and resonator)
- 1 × USB-to-serial adapter: SparkFun FTDI Basic (plugs in directly, DTR included) or USB-TTL cable (CP2102, FTDI)
- The pins are not pre-soldered: solder a male connector or pinch the wires during upload
- PC with the Arduino IDE and the
arduino:avrcore installed
Complete Code
// Clignotement de la LED builtin (broche 13)
const uint8_t LED = LED_BUILTIN; // broche 13 sur Pro Mini
void setup {
pinMode(LED, OUTPUT); // broche en sortie
}
void loop {
digitalWrite(LED, HIGH); // LED allumée
delay(500); // 500 ms
digitalWrite(LED, LOW); // LED éteinte
delay(500); // 500 ms
}
Expected Verification
In the Arduino IDE, select the board "Arduino Pro or Pro Mini" and the CPU corresponding to your model (for example "ATmega328P (5V, 16MHz)"), then the serial port of the FTDI/CP2102 adapter. The upload takes a few seconds (57600 bauds with the factory bootloader) and the LED blinks every 500 ms — even once the adapter is unplugged and the board is powered by a battery: the program fits within the 32 KB of flash (of which 2 KB is for the original ATmegaBOOT bootloader).
Common Errors
avrdude: stk500_getsync ... not in sync: resp=0x00: most often the wrong CPU is selected (5 V/16 MHz chosen for a 3.3 V/8 MHz board) — this is the #1 upload failure on the Pro Mini.- Simple FTDI cable without a DTR pin: auto-reset does not work; click the reset button on the board just before clicking Upload.
- TX/RX not crossed with a homemade adapter: connect the adapter's TX to RXI (pin 1) and RX to TO (pin 0) — the SparkFun FTDI Basic, however, plugs in directly without crossing.
- Wrong serial port: on a CH340/CP2102 clone, install the driver; the port must correspond to the USB-to-serial bridge, not to another board.
Other tutorials for this board
Code examples for this board
clignotante.inoArduinobouton-poussoir.inoArduinopwm-fade.inoArduinocapteur-lumiere-ldr.inoArduinoservo-balayage.inoArduinoruban-neopixel.inoArduino