🛠 Faire clignoter la LED intégrée de l'UNO R3
Objectives
Discover the reference board of the Arduino ecosystem: the UNO R3 (ATmega328P, 8-bit AVR, 16 MHz, 32 KB of flash, with 0.5 KB reserved for the bootloader). You will upload your first program and make the built-in LED blink, without any wiring.
Hardware
- 1 Arduino UNO R3 board (or compatible)
- 1 USB-B cable (the square connector on the UNO; USB-to-serial conversion is handled by the onboard ATmega16U2)
- A PC with the Arduino IDE (or arduino-cli)
- Optional for later steps: External LED + 330 Ω resistor on pin 13 — remember: 20 mA maximum per pin, always design with caution.
Complete code
// Blink — LED intégrée sur la pin 13 (LED marquée "L")
const uint8_t LED = 13;
void setup {
pinMode(LED, OUTPUT); // la broche devient une sortie
}
void loop {
digitalWrite(LED, HIGH); // LED allumée
delay(500); // 500 ms (blocant, c'est OK pour débuter)
digitalWrite(LED, LOW); // LED éteinte
delay(500);
}
In the IDE: Tools > Board > Arduino Uno, then select the displayed serial port, and click Upload.
Expected verification
The "L" LED blinks every 0.5 s as soon as the upload is complete, and continues even when you unplug the USB and power via the barrel jack (6–20 V, 7–12 V recommended): the program is burned into the flash, it runs autonomously.
Common errors
- Wrong board type selected (e.g. "Arduino Nano"): the upload fails with a bootloader timeout.
- Serial port not found on clones: some R1/R2 or third-party clones use a different USB-to-serial chip, install the appropriate driver (CH340, etc.).
- Confusing the power LED (ON, steady) and the user LED "L" (pin 13).
- Overloading the pin: never wire an LED without a resistor; the per-pin spec is 20 mA.
- Forgetting that delay blocks the entire program: useful here, but to be avoided as soon as you do two things at once (see the multitasking tutorial).
Other tutorials for this board
- Allumer une LED avec un bouton poussoir
- Faire varier la luminosité avec un potentiomètre (ADC + PWM)
- Thermomètre de lumière : LDR, seuils et hystérésis
- Télémétrie série robuste vers le Traceur série
- Multitâche non bloquant : heartbeat + bouton avec debounce
- Data logger sur EEPROM : persistance sans usure
Code examples for this board
clignotante.inoArduinobouton-poussoir.inoArduinopwm-fade.inoArduinocapteur-lumiere-ldr.inoArduinoservo-balayage.inoArduinoruban-neopixel.inoArduino