The Adafruit Metro with Headers is a versatile and user-friendly development board based on the ATmega328P microcontroller, which is the same microcontroller used in the popular Arduino UNO. This board is designed for hobbyists, educators, and professionals who need a reliable platform for electronics projects. With pre-soldered headers, the Metro provides an easy way to connect a wide range of components and peripherals without the need for soldering, making it ideal for prototyping and quick experimentation.
Pin Number | Function | Description |
---|---|---|
1 | RESET | Used to reset the microcontroller |
2-13 | Digital I/O | Digital input/output pins, PWM on 3, 5, 6, 9, 10, 11 |
14-19 | Analog Input | Analog input pins A0-A5 |
20, 21 | SDA, SCL | I2C data and clock lines |
22, 23 | RX, TX | UART receive and transmit |
24 | 5V | Regulated power supply for the board and components |
25 | 3.3V | Regulated power supply for 3.3V components |
26 | GND | Ground |
27 | AREF | Analog reference voltage for the ADC |
28 | VIN | Input voltage to the board |
Powering the Board: Connect a 7-12V power supply to the VIN and GND pins, or plug in a USB cable to the board's USB port to power it via USB.
Connecting Peripherals: Use the digital and analog pins to connect sensors, actuators, displays, and other components. Ensure that the peripherals are compatible with the board's operating voltage.
Programming the Board: The Adafruit Metro with Headers can be programmed using the Arduino IDE. Select "Arduino UNO" as the board type, as the Metro is pin-compatible with the UNO.
Q: Can I use shields designed for the Arduino UNO with the Adafruit Metro? A: Yes, the Metro is designed to be pin-compatible with the Arduino UNO, so most shields should work.
Q: What should I do if I accidentally connect a higher voltage to the I/O pins? A: Disconnect the power immediately. The board may be damaged, but sometimes it can survive if the exposure to the higher voltage was brief.
Q: How do I reset the board? A: You can press the reset button on the board or momentarily connect the RESET pin to GND.
Here is a simple example of blinking the onboard LED using the Adafruit Metro with Headers:
// Pin 13 has an LED connected on most Arduino boards.
int led = 13;
// The setup routine runs once when you press reset:
void setup() {
// Initialize the digital pin as an output.
pinMode(led, OUTPUT);
}
// The loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // Turn the LED on (HIGH is the voltage level)
delay(1000); // Wait for a second
digitalWrite(led, LOW); // Turn the LED off by making the voltage LOW
delay(1000); // Wait for a second
}
Remember to keep the code comments concise and within the 80 character line length limit. This example demonstrates the basic structure of an Arduino sketch, including setup and loop functions, and how to control a digital output.