The reset button cannot be used as a GPIO, but we think its a lot more useful as a proper reset button! If you want to re-program the board when its in an enclosure or box or otherwise hard to reach, wire a simple button from the RST pin to ground and press it to enter the bootloader for 10 seconds. It's also possible to use this pin to re-program in the bootloader or completely remove the bootloader if you have an AVR programmer such as an AVR Dragon, MKii or USBtinyISP. The reset pin is used to enter the bootloader and to reset the board in case you want to restart it. This is connected directly to the ATtiny85's reset pin and also the reset button which is right next to it. The final two pins are at the bottom of the board.įirst is the Rst reset pin. this pin is used for USB programming, but it can also be used as a PWM analog output and an analog input known as Analog A2
GPIO #4 - this is connected to PB4 on the Attiny85.This pin has a 1.5K pullup to 3.3V built into the Trinket, for USB comm so it may be difficult to use for analog or digital input. This pin is used for USB programming, but its also an analog input known as Analog A3 GPIO #3 - this is connected to PB3 on the Attiny85.
We didn't want to keep these pins off the board but we strongly recommend not using them unless you're sure you need them since you might have to disconnect any connections to reprogram the Trinket! The best use of these pins is as outputs to things like LEDs. That means that when the Trinket is connected to a computer and in bootloader mode or in the middle of uploading a new program, they are used for sending data to/from the computer! It's possible to share these pins if you are careful. The next 2 pins are also used for USB programming. This pin can be used as an analog input (known as Analog A1), and is also used for I2C clock and SPI clock.
On a 3V Trinket, the GPIO are 3.3V output level, and should not be used with 5V inputs. Don't connect a motor or other high-power component directly to the pins! Instead, use a transistor to power the DC motor on/off Next we will cover the 5 GPIO (General Purpose Input Ouput) pins! For reference you may want to also check out the datasheet-reference above for the core ATtiny85 pinĪll the GPIO pins can be used as digital inputs, digital outputs, for LEDs, buttons and switches etc.