The Leonardo Tiny Atmega32U4 is a compact microcontroller board designed by Duinotech, part of Jaycar Electronics' range of electronic components. Based on the ATmega32U4 microcontroller, this board stands out for its built-in USB communication, allowing it to emulate a computer keyboard, mouse, or other HID class USB devices. This feature makes it particularly suitable for projects that require interfacing with a computer or other USB hosts directly without the need for an additional USB-serial converter.
Pin Number | Function | Description |
---|---|---|
1 | TXD/INT3/PD3 | Serial transmit (can be used as GPIO) |
2 | RXD/INT2/PD2 | Serial receive (can be used as GPIO) |
3 | SDA/INT1/PD1 | I2C Data line (can be used as GPIO) |
4 | SCL/INT0/PD0 | I2C Clock line (can be used as GPIO) |
... | ... | ... |
20 | AREF | Analog reference voltage |
Note: This table is not exhaustive and only includes a selection of pins for illustration.
Powering the Board:
Connecting I/O Devices:
Programming the Board:
Board Not Recognized by Computer:
Sketch Not Uploading:
Q: Can I use the Leonardo Tiny Atmega32U4 as a keyboard emulator?
Q: What is the maximum number of external interrupts available?
Q: How do I connect an I2C device to the Leonardo Tiny Atmega32U4?
// Example sketch for Leonardo Tiny Atmega32U4
// This sketch turns the Leonardo Tiny Atmega32U4 into a simple USB keyboard
#include "Keyboard.h"
void setup() {
// Start the keyboard emulation
Keyboard.begin();
}
void loop() {
// Press and release the 'A' key
Keyboard.press('a');
delay(100); // Wait for 100 milliseconds
Keyboard.release('a');
delay(1000); // Wait for a second before sending the next key
// Add additional keyboard actions here
}
// Note: The Keyboard library is only compatible with boards that have native USB
// capabilities such as the Leonardo Tiny Atmega32U4. It will not work with boards
// like the Arduino UNO without additional hardware.
Note: The above code is a simple demonstration of using the Leonardo Tiny Atmega32U4 as a USB keyboard. For more complex interactions, refer to the Keyboard library documentation and examples.
This documentation provides an overview of the Leonardo Tiny Atmega32U4, its technical specifications, usage instructions, and troubleshooting tips. For further assistance, consult the manufacturer's resources or community forums.