The Adafruit Trinket 5V is a versatile and compact microcontroller board that serves as a perfect solution for small projects where space is at a premium. Based on the ATtiny85 microcontroller, the Trinket offers a robust platform for hobbyists and professionals alike to create wearable electronics, tiny robots, or even to add intelligence to everyday objects. Its compatibility with the Arduino IDE allows for a familiar programming environment, making it accessible to a wide range of users.
Pin Number | Name | Description |
---|---|---|
1 | BAT+ | Battery input for an external power source (7-16V DC) |
2 | GND | Ground pin |
3 | 5V | Regulated 5V output from the onboard regulator |
4 | #0 | GPIO pin, also used for USB data- if the Trinket is programming |
5 | #1 | GPIO pin, can be used for PWM output |
6 | #2 | GPIO pin, can be used for analog input |
7 | #3 | GPIO pin, also used for USB data+ if the Trinket is programming |
8 | #4 | GPIO pin, can be used for PWM output or analog input |
9 | RST | Reset pin, can be used to restart the microcontroller |
LOW
power modes of the ATtiny85 when possible.// Blink an LED connected to pin #1 on the Adafruit Trinket 5V
void setup() {
pinMode(1, OUTPUT); // Set pin #1 as an output
}
void loop() {
digitalWrite(1, HIGH); // Turn the LED on
delay(1000); // Wait for a second
digitalWrite(1, LOW); // Turn the LED off
delay(1000); // Wait for a second
}
Note: The above code is a simple example to get you started with the Trinket. The actual implementation may vary based on the specific requirements of your project. Always refer to the official Adafruit documentation and the ATtiny85 datasheet for more detailed information.