Stufin
Home Quick Cart Profile

Arduino Leonardo R3 compatible board

Buy Now on Stufin

Microcontroller

The ATmega32U4 is a 32-bit AVR microcontroller that provides 32 KB of flash memory, 2.5 KB of SRAM, and 1 KB of EEPROM.

Input/OutputThe board features 20 digital input/output pins, 7 of which can be used as PWM outputs, and 12 analog input pins.

Communication

The board supports various communication protocols, including UART, SPI, and I2C.

USB

The board has a built-in USB interface that allows it to connect to a computer and act as a USB device.

Key Features

Some of the key features of the Arduino Leonardo R3 compatible board include
Micro-USB InterfaceThe board features a micro-USB interface that allows it to connect to a computer and act as a USB device.
12 Analog Input PinsThe board has 12 analog input pins that can be used to read analog signals from sensors and other devices.
7 PWM OutputsThe board has 7 digital pins that can be used as PWM outputs, making it suitable for projects that require PWM control.
16 MHz Clock SpeedThe ATmega32U4 microcontroller has a clock speed of 16 MHz, making it suitable for demanding projects.
32 KB Flash MemoryThe board has 32 KB of flash memory, providing ample storage space for programs and data.
2.5 KB SRAMThe board has 2.5 KB of SRAM, providing a generous amount of memory for data storage and processing.
1 KB EEPROMThe board has 1 KB of EEPROM, providing a non-volatile storage space for data and programs.

Dimensions and Layout

The Arduino Leonardo R3 compatible board has a compact design with a layout that is identical to the Arduino Leonardo R3 board. The board measures 68.6 mm x 53.3 mm (2.7 inches x 2.1 inches) and has a thickness of 10 mm (0.4 inches).

Shields and Accessories

The board is compatible with a range of shields and accessories, including motor shields, sensor shields, and display shields. This allows users to expand the functionality of the board to suit their specific project requirements.

Operating Conditions

The Arduino Leonardo R3 compatible board operates within the following conditions

Operating Temperature

0C to 70C (32F to 158F)

Supply Voltage

5V

Input Voltage

5V to 12V

Certifications and Compliance

The Arduino Leonardo R3 compatible board complies with the following certifications and standards

RoHS

The board is RoHS compliant, meaning it meets the European Union's restrictions on hazardous substances.

CE

The board is CE certified, indicating that it meets the European Union's health, safety, and environmental protection standards.

Documentation and Resources

A range of documentation and resources are available for the Arduino Leonardo R3 compatible board, including

Datasheets

Detailed datasheets for the ATmega32U4 microcontroller and other components are available.

User Manuals

Comprehensive user manuals provide detailed information on setting up and using the board.

Code Examples

Sample code examples are available for various programming languages, including C, C++, and Python.

Community Support

The Arduino community provides extensive support, including forums, tutorials, and project examples.

Pin Configuration

  • Arduino Leonardo R3 Compatible Board Pinout Guide
  • The Arduino Leonardo R3 compatible board is a microcontroller-based board that is similar to the original Arduino Leonardo board. It features the ATmega32U4 microcontroller, which provides a wide range of capabilities for IoT and robotics projects. In this guide, we will explore the pinout of the Arduino Leonardo R3 compatible board, explaining each pin's function and how to connect them.
  • Digital Pins
  • 1. Digital Pin 0 (RX):
  • Function: Receive (RX) pin for serial communication (UART)
  • Connection: Connect to the TX pin of another serial device or to a serial communication module (e.g., Bluetooth or Wi-Fi)
  • 2. Digital Pin 1 (TX):
  • Function: Transmit (TX) pin for serial communication (UART)
  • Connection: Connect to the RX pin of another serial device or to a serial communication module (e.g., Bluetooth or Wi-Fi)
  • 3. Digital Pin 2:
  • Function: Digital input/output pin
  • Connection: Can be used as an input to read digital signals or as an output to control devices (e.g., LEDs, relays)
  • 4. Digital Pin 3:
  • Function: Digital input/output pin, also an interrupt pin (INT0)
  • Connection: Can be used as an input to read digital signals or as an output to control devices (e.g., LEDs, relays); can also be used as an interrupt pin to trigger events
  • 5. Digital Pin 4:
  • Function: Digital input/output pin
  • Connection: Can be used as an input to read digital signals or as an output to control devices (e.g., LEDs, relays)
  • 6. Digital Pin 5:
  • Function: Digital input/output pin, also a PWM (Pulse-Width Modulation) pin
  • Connection: Can be used as an input to read digital signals or as an output to control devices (e.g., LEDs, relays); can also be used to generate PWM signals for motor control or LED dimming
  • 7. Digital Pin 6:
  • Function: Digital input/output pin, also a PWM pin
  • Connection: Can be used as an input to read digital signals or as an output to control devices (e.g., LEDs, relays); can also be used to generate PWM signals for motor control or LED dimming
  • 8. Digital Pin 7:
  • Function: Digital input/output pin
  • Connection: Can be used as an input to read digital signals or as an output to control devices (e.g., LEDs, relays)
  • 9. Digital Pin 8:
  • Function: Digital input/output pin, also an I2C clock (SCL) pin
  • Connection: Can be used as an input to read digital signals or as an output to control devices (e.g., LEDs, relays); can also be used as the clock pin for I2C communication
  • 10. Digital Pin 9:
  • Function: Digital input/output pin, also an I2C data (SDA) pin
  • Connection: Can be used as an input to read digital signals or as an output to control devices (e.g., LEDs, relays); can also be used as the data pin for I2C communication
  • 11. Digital Pin 10:
  • Function: Digital input/output pin, also a SPI clock (SCK) pin
  • Connection: Can be used as an input to read digital signals or as an output to control devices (e.g., LEDs, relays); can also be used as the clock pin for SPI communication
  • 12. Digital Pin 11:
  • Function: Digital input/output pin, also a SPI master out (MOSI) pin
  • Connection: Can be used as an input to read digital signals or as an output to control devices (e.g., LEDs, relays); can also be used as the master out pin for SPI communication
  • 13. Digital Pin 12:
  • Function: Digital input/output pin, also a SPI master in (MISO) pin
  • Connection: Can be used as an input to read digital signals or as an output to control devices (e.g., LEDs, relays); can also be used as the master in pin for SPI communication
  • Analog Pins
  • 1. Analog Pin A0:
  • Function: Analog input pin
  • Connection: Can be used to read analog signals from sensors (e.g., temperature, light, sound)
  • 2. Analog Pin A1:
  • Function: Analog input pin
  • Connection: Can be used to read analog signals from sensors (e.g., temperature, light, sound)
  • 3. Analog Pin A2:
  • Function: Analog input pin
  • Connection: Can be used to read analog signals from sensors (e.g., temperature, light, sound)
  • 4. Analog Pin A3:
  • Function: Analog input pin, also an I2C clock (SCL) pin
  • Connection: Can be used to read analog signals from sensors (e.g., temperature, light, sound); can also be used as the clock pin for I2C communication
  • 5. Analog Pin A4:
  • Function: Analog input pin, also an I2C data (SDA) pin
  • Connection: Can be used to read analog signals from sensors (e.g., temperature, light, sound); can also be used as the data pin for I2C communication
  • 6. Analog Pin A5:
  • Function: Analog input pin
  • Connection: Can be used to read analog signals from sensors (e.g., temperature, light, sound)
  • Power Pins
  • 1. VIN:
  • Function: Input voltage pin (7-12V)
  • Connection: Connect to a power source (e.g., battery, wall adapter) to power the board
  • 2. 5V:
  • Function: Regulated 5V output pin
  • Connection: Can be used to power external devices that require a 5V supply
  • 3. 3.3V:
  • Function: Regulated 3.3V output pin
  • Connection: Can be used to power external devices that require a 3.3V supply
  • 4. GND:
  • Function: Ground pin
  • Connection: Use as a common ground for all devices connected to the board
  • 5. Reset:
  • Function: Reset pin
  • Connection: Connect to a reset button or a pulse signal to reset the board
  • Other Pins
  • 1. ICSP (In-Circuit Serial Programming) Header:
  • Function: Used for programming the board using an external programmer
  • Connection: Connect to an external programmer (e.g., Arduino ISP, AVRISP) to upload code to the board
  • 2. JTAG Header:
  • Function: Used for debugging and programming the board using a JTAG interface
  • Connection: Connect to a JTAG interface (e.g., AVR Dragon, JTAGICE) to debug and program the board
  • When connecting pins, ensure that you use the correct voltage levels and signal types to avoid damaging the board or connected devices. Always refer to the datasheet and relevant documentation for specific pin connections and usage guidelines.

Code Examples

Arduino Leonardo R3 Compatible Board Documentation
Overview
The Arduino Leonardo R3 compatible board is a microcontroller board based on the ATmega32U4 chip. It is a popular choice for building interactive projects, robots, and IoT devices. This board is compatible with the Arduino IDE and offers a range of features, including digital and analog input/output pins, serial communication capabilities, and USB connectivity.
Hardware Specifications
Microcontroller: ATmega32U4
 Operating Voltage: 5V
 Input Voltage: 7-12V
 Digital I/O Pins: 20
 Analog Input Pins: 12
 Analog Output Pins: 0
 Flash Memory: 32 KB
 SRAM: 2.5 KB
 EEPROM: 1 KB
 Clock Speed: 16 MHz
Code Examples
### Example 1: Blinking LED
This example demonstrates how to use the Arduino Leonardo R3 compatible board to blink an LED connected to digital pin 13.
```cpp
const int ledPin = 13;  // choose the pin for the LED
void setup() {
  pinMode(ledPin, OUTPUT);  // set the pin as an output
}
void loop() {
  digitalWrite(ledPin, HIGH);  // turn the LED on
  delay(1000);                 // wait for 1 second
  digitalWrite(ledPin, LOW);   // turn the LED off
  delay(1000);                 // wait for 1 second
}
```
### Example 2: Reading Analog Input
This example demonstrates how to use the Arduino Leonardo R3 compatible board to read an analog input from a potentiometer connected to analog pin A0.
```cpp
const int potPin = A0;  // choose the pin for the potentiometer
int potValue = 0;       // variable to store the potentiometer value
void setup() {
  Serial.begin(9600);  // initialize serial communication
}
void loop() {
  potValue = analogRead(potPin);  // read the potentiometer value
  Serial.print("Potentiometer value: ");
  Serial.println(potValue);       // print the value to the serial monitor
  delay(500);                     // wait for 0.5 seconds
}
```
### Example 3: USB Serial Communication
This example demonstrates how to use the Arduino Leonardo R3 compatible board to send and receive data over USB serial communication.
```cpp
void setup() {
  Serial.begin(9600);  // initialize serial communication
}
void loop() {
  if (Serial.available() > 0) {
    String data = Serial.readStringUntil('
');  // read data from the serial port
    Serial.print("Received data: ");
    Serial.println(data);                     // print the received data
  }
  Serial.println("Hello, world!");            // send data over the serial port
  delay(1000);                                // wait for 1 second
}
```
Note: These examples assume that you have the Arduino IDE installed and have selected the correct board type (Arduino Leonardo) and serial port.