The SparkFun Pro Micro is a compact microcontroller board based on the ATmega32U4, a member of the AVR family of microcontrollers. It is designed for use in projects where space is at a premium, offering the functionality of the larger Arduino Leonardo in a smaller form factor. The Pro Micro is notable for its on-board USB connectivity, which allows it to emulate a mouse, keyboard, or other USB device, making it a popular choice for HID projects.
Pin Number | Function | Description |
---|---|---|
1 | GND | Ground |
2 | RST | Reset pin, active low |
3 | VCC | Positive supply voltage |
4-5 | PD5, PD6 | Digital pins, PWM capable (D3, D4) |
6-7 | PD7, PE6 | Digital pins (D6, D7) |
8-11 | PB0-PB3 | Digital pins, PWM capable (D8-D10), MOSI/MISO |
12 | PB4 | Digital pin, PWM capable (D11), MISO |
13-16 | PB5-PB7, PD0 | Digital pins (D14-D16), SCK, RX LED |
17-20 | PD1-PD4 | Digital pins (D2, D5, TX LED, RX) |
21-24 | PF0-PF3 | Analog pins (A1-A4) |
25 | PF4 | Analog pin (A5) |
Powering the Pro Micro: Connect the VCC pin to a 5V or 3.3V power supply, depending on the model of your Pro Micro. Ensure that the power supply is within the input voltage range specified for your model.
Programming the Pro Micro: Connect the board to your computer using a micro USB cable. The Pro Micro can be programmed using the Arduino IDE. Select "Arduino Leonardo" as the board type, as the Pro Micro shares the same microcontroller.
Connecting I/O Pins: Use the digital and analog pins to connect sensors, actuators, and other components. Remember to configure the pins correctly in your code.
Using USB Functionality: To use the Pro Micro's USB capabilities, include the appropriate libraries in your Arduino sketch, such as Keyboard.h
or Mouse.h
.
Here is a simple example of how to blink an LED connected to pin 9 (D9) on the SparkFun Pro Micro:
// Define the LED pin
const int ledPin = 9;
void setup() {
// Set the LED pin as an output
pinMode(ledPin, OUTPUT);
}
void loop() {
// Turn the LED on
digitalWrite(ledPin, HIGH);
delay(1000); // Wait for 1 second
// Turn the LED off
digitalWrite(ledPin, LOW);
delay(1000); // Wait for 1 second
}
Remember to adjust the ledPin
variable if you connect your LED to a different pin. This code will toggle the LED on and off every second, creating a blinking effect.