Indledning
The Arduino Leonardo is a microcontroller board based on the ATmega32U4. It features 20 digital input/output pins (7 of which can be used as PWM outputs and 12 as analog inputs), a 16 MHz crystal oscillator, a micro USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with an AC-to-DC adapter or battery to get started.
A key distinction of the Leonardo is that its ATmega32U4 has built-in USB communication, eliminating the need for a secondary processor. This allows the Leonardo to appear to a connected computer as a mouse and keyboard, in addition to a virtual (CDC) serial / COM port.
Funktioner
- Mikrocontroller: ATmega32U4
- Operation Voltage: 5V
- Input bindtage (recommended): 7-12V
- Digitale I/O-stifter: 20 (7 PWM, 12 Analog Input)
- PWM Digital I/O Pins: 7
- Analog Input Pins: 12
- DC Current per I/O Pin: 40 mA
- DC Current for 3.3V Pin: 50 mA
- Flash-hukommelse: 32 KB (ATmega32U4) of which 4 KB used by bootloader
- SRAM: 2.5 KB (ATmega32U4)
- EEPROM: 1 KB (ATmega32U4)
- Urhastighed: 16 MHz
- USB HID-understøttelse: Acts as a generic keyboard and mouse.
Produkt overview

Figur 1: Top view of the Arduino Leonardo board, showing the microcontroller, USB port, power jack, and various digital and analog pins.

Figur 2: The Arduino Leonardo board partially removed from its retail packaging, illustrating the product presentation.

Figur 3: Bund view of the Arduino Leonardo board, highlighting the "Open-Source Electronics Platform" and "Designed and Assembled in Italy" markings.

Figur 4: Forside og bagside views of the Arduino Leonardo product packaging, displaying key specifications and branding.

Figur 5: The Arduino Leonardo board mounted on a clear protective base, showcasing its form factor and pin headers.
Specifikationer
| Attribut | Værdi |
|---|---|
| mikrocontrollere | ATmega32U4 |
| Operation Voltage | 5V |
| Input bindtage (anbefales) | 7-12V |
| Digitale I / O-pins | 20 |
| PWM digitale I/O-ben | 7 |
| Analoge indgangsstifter | 12 |
| Jævnstrøm pr. I / O-pin | 40 mA |
| DC strøm til 3.3V pin | 50 mA |
| Flash-hukommelse | 32 KB (4 KB used by bootloader) |
| SRAM | 2.5 KB |
| EEPROM | 1 KB |
| Urhastighed | 16 MHz |
| Dimensioner | 3 x 1 x 2 tommer (ca. 76.2 x 25.4 x 50.8 mm) |
| Varens vægt | 0.882 ounce (ca. 25 gram) |
| Fabrikant | ARDUINO |
| Oprindelsesland | Italien |
| Modelnummer | A000057 |
Opsætningsvejledning
1. Software Installation (Arduino IDE)
- Download the Arduino IDE: Besøg den officielle Arduino webwebsted (arduino.cc/en/software) and download the latest version of the Arduino IDE for your operating system (Windows, macOS, Linux).
- Install the IDE: Follow the installation instructions provided on the Arduino website or within the downloaded installer. For Windows, this typically involves running the executable. For macOS, drag the application to your Applications folder.
- Driver installation: The Arduino IDE installer usually includes the necessary USB drivers. If you encounter issues, refer to the official Arduino troubleshooting guides for manual driver installation. The Leonardo's ATmega32U4 handles USB communication directly, often simplifying driver setup.
2. Tilslutning af bestyrelsen
- Tilslut USB-kabel: Use a micro-USB cable to connect the Arduino Leonardo board to your computer. The board will power on, and the "ON" LED should illuminate.
- Select Board in IDE: Åbn Arduino IDE'en. Gå til Værktøjer > Bræt og vælg "Arduino Leonardo" fra listen.
- Select Port in IDE: Gå til Værktøjer > Port. Select the serial port that corresponds to your Arduino Leonardo. On Windows, this will typically be a COM port (e.g., COM3, COM4). On macOS, it will be a `/dev/cu.usbmodemXXXX` or similar.
Betjeningsvejledning
Uploading Your First Sketch (Blink Exampdet)
- Åbn Example Sketch: In the Arduino IDE, go to File > Eksamples > 01.Grundlæggende > Blink. This will open a new window with the Blink sketch.
- Verify Sketch: Click the "Verify" button (checkmark icon) in the Arduino IDE toolbar. This compiles the code and checks for errors.
- Upload Sketch: Click the "Upload" button (right arrow icon) in the Arduino IDE toolbar. The IDE will compile the sketch and then upload it to your Arduino Leonardo board.
- Observe LED: Once uploaded, the built-in LED on your Leonardo board (usually labeled "L") should start blinking on and off at one-second intervals.
Using USB HID Capabilities
The Arduino Leonardo can emulate a USB keyboard or mouse. This allows you to create projects that interact directly with your computer's operating system, such as custom keypads, game controllers, or automated input devices.
- Keyboard Library: Brug den indbyggede Tastatur library to send keystrokes to your computer.
- Mouse Library: Brug den indbyggede Mus library to control the mouse cursor.
- Refer to the Arduino IDE examples under File > Eksamples > 09.USB > Keyboard or Mus for sampkoden.
Styring af bestyrelsen
The Arduino Leonardo can be powered in several ways:
- USB-forbindelse: The primary method is via the micro-USB connection to a computer or a USB power adapter. This provides 5V.
- Power Jack: An external power supply (AC-to-DC adapter or battery) can be connected to the power jack. The recommended input voltage er 7V til 12V.
- Vin Pin: Power can also be supplied to the board via the Vin pin (7-12V).
- 5V Pin: A regulated 5V supply can be provided to the 5V pin. This bypasses the on-board voltage regulator and should only be used with a stable 5V source.
Opretholdelse
- Håndteres med forsigtighed: The Arduino Leonardo is an electronic circuit board. Avoid bending or dropping it.
- Statisk elektricitet: Discharge any static electricity from your body before handling the board, as static can damage electronic components.
- Hold tør: Protect the board from moisture and extreme temperatures.
- Renhed: Keep the board free from dust and debris. Use compressed air or a soft brush if necessary.
- Strømforsyning: Always ensure your power supply voltage is within the recommended range (7-12V for power jack/Vin, 5V for 5V pin) to prevent damage.
Fejlfinding
Board Not Recognized / Driver Issues
- Tjek USB-kabel: Ensure the USB cable is fully inserted and not faulty. Try a different USB port or cable.
- Geninstaller drivere: If the board is not appearing in the Tools > Port menu, try reinstalling the Arduino IDE, which includes the necessary drivers. For manual installation, refer to Arduino's official documentation.
- Genstart computeren: Nogle gange kan en simpel genstart løse problemer med drivergenkendelse.
"Error Compiling / Uploading"
- Correct Board Selected: Verify that "Arduino Leonardo" is selected under Værktøjer > Bræt.
- Correct Port Selected: Sørg for, at den korrekte serielle port er valgt under Værktøjer > Port.
- Syntax Errors: Check your code for any syntax errors. The Arduino IDE will highlight lines with errors in the console.
- Bootloader: If the board was previously programmed with a custom bootloader or if the bootloader is corrupted, you might need to re-burn the bootloader using an ISP programmer.
Sketch Uploads, But Nothing Happens
- Tjek ledninger: Double-check all connections to external components.
- Code Logic: Review your sketch's logic to ensure it performs the intended actions. Use `Serial.print()` statements for debugging.
- Strømforsyning: Ensure adequate power is supplied to the board and any connected components.
Garantioplysninger
Arduino products are manufactured with high-quality standards. For specific warranty terms and conditions, please refer to the official Arduino website or contact Arduino customer support. Typically, products are covered against manufacturing defects for a limited period from the date of purchase.
Støtte
For further assistance, technical documentation, community forums, and additional resources, please visit the official Arduino webwebsted:
- Officiel Webwebsted: www.arduino.cc
- Dokumentation: docs.arduino.cc
- Fællesskabsforum: forum.arduino.cc





