The Adafruit Pro Trinket 5V 16MHz is a compact, Arduino-compatible microcontroller board designed for small projects where space is at a premium. It is based on the ATmega328P microcontroller and operates at a clock speed of 16MHz. The board is compatible with 5V logic levels and can be powered through a USB connection or an external power supply. With 18 digital input/output pins, 2 analog inputs, and support for SPI, I2C, and UART communication protocols, the Pro Trinket is versatile for a wide range of applications, from wearables to sensor networks.
Pin Number | Function | Description |
---|---|---|
1 | GND | Ground |
2 | VBAT | Battery +, 3.5-16V DC for battery-powered operation |
3 | BUS | USB +5V to any point in the circuit |
4-9 | Digital I/O | Digital pins D0-D5 |
10-15 | Digital I/O | Digital pins D6-D11 |
16-17 | Analog Input | Analog pins A0-A1 |
18 | RESET | Reset pin |
19 | 3V | 3.3V output (150mA max) |
20 | 5V | Regulated 5V output (150mA max) |
Powering the Pro Trinket:
Programming the Pro Trinket:
Connecting Peripherals:
Pro Trinket not recognized by the computer:
Sketch not uploading:
Peripherals not working as expected:
Q: Can I power the Pro Trinket with a battery? A: Yes, you can power it with an external battery connected to the VBAT pin.
Q: Is the Pro Trinket 5V compatible with 3.3V logic sensors? A: The Pro Trinket operates at 5V logic levels, so a logic level converter is recommended when interfacing with 3.3V sensors.
Q: How do I reset the Pro Trinket? A: Press the onboard reset button to reset the Pro Trinket.
Q: Can I use the Arduino IDE to program the Pro Trinket? A: Yes, the Arduino IDE can be used to program the Pro Trinket after installing the appropriate board definitions.
// Blink an LED connected to pin 13 of the Pro Trinket
void setup() {
pinMode(13, OUTPUT); // Initialize pin 13 as an output
}
void loop() {
digitalWrite(13, HIGH); // Turn the LED on
delay(1000); // Wait for a second
digitalWrite(13, LOW); // Turn the LED off
delay(1000); // Wait for a second
}
Remember to comment your code adequately for clarity and maintainability. The above example is a simple blink sketch that demonstrates how to control a digital output on the Pro Trinket.