Datasheet

Programming with Arduino IDE
Once you've gotten the basic Blink example to work, you can try some of the other Arduino
functions and libraries. We'll be filling out this section with more example code and links to tutorials -
this is just to get you started!
pinMode() & digitalWrite() & digitalRead()
You can use pinMode() to make inputs and outputs on any of digital pins #0 thru #4
digitalWrite also works well, and you can also use it with pinMode(INPUT) to activate the internal
pull-up resistor on a pin
For example, to set up digital #0 as an input, with an internal pullup, and then check if it is being
pulled to ground via a button or switch and turn on the red LED when it is pressed:
© Adafruit
Industries
https://learn.adafruit.com/introducing-trinket Page 40 of 65